skip enter events caused by temporarily raising windows during alt-tab. also caused...
authorDana Jansens <danakj@orodu.net>
Fri, 25 Jan 2008 05:35:31 +0000 (00:35 -0500)
committerDana Jansens <danakj@orodu.net>
Fri, 25 Jan 2008 05:48:45 +0000 (00:48 -0500)
openbox/focus_cycle_indicator.c
openbox/stacking.c

index 0aa65a7..7c5d529 100644 (file)
@@ -158,6 +158,7 @@ void focus_cycle_draw_indicator(ObClient *c)
         */
         gint x, y, w, h;
         gint wt, wl, wr, wb;
+        gulong ignore_start;
 
         wt = wl = wr = wb = FOCUS_INDICATOR_WIDTH;
 
@@ -166,6 +167,9 @@ void focus_cycle_draw_indicator(ObClient *c)
         w = c->frame->area.width;
         h = wt;
 
+        /* kill enter events cause by this moving */
+        ignore_start = event_start_ignore_all_enters();
+
         XMoveResizeWindow(ob_display, focus_indicator.top.win,
                           x, y, w, h);
         a_focus_indicator->texture[0].data.lineart.x1 = 0;
@@ -270,6 +274,8 @@ void focus_cycle_draw_indicator(ObClient *c)
         XMapWindow(ob_display, focus_indicator.right.win);
         XMapWindow(ob_display, focus_indicator.bottom.win);
 
+        event_end_ignore_all_enters(ignore_start);
+
         visible = TRUE;
     }
 }
index b18c02a..63819ae 100644 (file)
@@ -114,6 +114,7 @@ void stacking_temp_raise(ObWindow *window)
 {
     Window win[2];
     GList *it;
+    gulong start;
 
     /* don't use this for internal windows..! it would lower them.. */
     g_assert(window_layer(window) < OB_STACKING_LAYER_INTERNAL);
@@ -129,7 +130,9 @@ void stacking_temp_raise(ObWindow *window)
     }
 
     win[1] = window_top(window);
+    start = event_start_ignore_all_enters();
     XRestackWindows(ob_display, win, 2);
+    event_end_ignore_all_enters(start);
 
     pause_changes = TRUE;
 }
@@ -139,12 +142,15 @@ void stacking_restore(void)
     Window *win;
     GList *it;
     gint i;
+    gulong start;
 
     win = g_new(Window, g_list_length(stacking_list) + 1);
     win[0] = screen_support_win;
     for (i = 1, it = stacking_list; it; ++i, it = g_list_next(it))
         win[i] = window_top(it->data);
+    start = event_start_ignore_all_enters();
     XRestackWindows(ob_display, win, i);
+    event_end_ignore_all_enters(start);
     g_free(win);
 
     pause_changes = FALSE;