]> Dogcows Code - chaz/tint2/blobdiff - src/tint.c
fixed bug when active window draged to another desktop
[chaz/tint2] / src / tint.c
index e5bde53391fe2d88e24c7362d55eace541de3bff..87a57fc2b497e3dc086fafa7784d2cbe4349c8e5 100644 (file)
@@ -479,11 +479,16 @@ void event_property_notify (XEvent *e)
       // Window desktop changed
       else if (at == server.atom._NET_WM_DESKTOP) {
                        int desktop = window_get_desktop (win);
+                       int active = tsk->area.is_active;
                        //printf("  Window desktop changed %d, %d\n", tsk->desktop, desktop);
                        // bug in windowmaker : send unecessary 'desktop changed' when focus changed
                        if (desktop != tsk->desktop) {
                                remove_task (tsk);
-                               add_task (win);
+                               tsk = add_task (win);
+                               if (tsk && active) {
+                                       tsk->area.is_active = 1;
+                                       task_active = tsk;
+                               }
                                panel_refresh = 1;
                        }
       }
This page took 0.02344 seconds and 4 git commands to generate.