]> Dogcows Code - chaz/tint2/commitdiff
*fix* finally fixed issue 145
authorAndreas Fink <andreas.fink85@googlemail.com>
Wed, 11 Nov 2009 18:25:55 +0000 (18:25 +0000)
committerAndreas Fink <andreas.fink85@googlemail.com>
Wed, 11 Nov 2009 18:25:55 +0000 (18:25 +0000)
src/tint.c

index ece6dbc5f4655996caf1e3a169ae2a8f90e33c76..d33ea3854ef47f9cbf613b061779bfb501aeea2c 100644 (file)
@@ -480,14 +480,19 @@ void event_property_notify (XEvent *e)
        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);
This page took 0.027567 seconds and 4 git commands to generate.