all repos — tint2 @ 9f4e539f0b226b5c5200c56497bf3b99e74025d6

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

*fix* finally fixed issue 145


git-svn-id: http://tint2.googlecode.com/svn/trunk@263 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
Andreas.Fink85 Andreas.Fink85@121b4492-b84c-0410-8b4c-0d4edfb3f3cc
commit

9f4e539f0b226b5c5200c56497bf3b99e74025d6

parent

3f9adec3e366e005bff1483cb9dd988581f1c1cb

1 files changed, 11 insertions(+), 6 deletions(-)

jump to
M src/tint.csrc/tint.c

@@ -480,14 +480,19 @@ }

else { tsk = task_get_task (win); if (!tsk) { - // some stupid wm send _NET_WM_STATE after the window was minimized to tray??? if (at != server.atom._NET_WM_STATE) return; - else if (!window_is_skip_taskbar(win)) { - if (tsk = add_task(win)) - panel_refresh = 1; - else - return; + else { + // xfce4 sends _NET_WM_STATE after minimized to tray, so we need to check if window is mapped + // if it is mapped and not set as skip_taskbar, we must add it to our task list + XWindowAttributes wa; + XGetWindowAttributes(server.dsp, win, &wa); + if (wa.map_state == IsViewable && !window_is_skip_taskbar(win)) { + if ( (tsk = add_task(win)) ) + panel_refresh = 1; + else + return; + } } } //printf("atom root_win = %s, %s\n", XGetAtomName(server.dsp, at), tsk->title);