]> Dogcows Code - chaz/openbox/blobdiff - openbox/focus_cycle_indicator.c
make the internal window type more easily inheritable
[chaz/openbox] / openbox / focus_cycle_indicator.c
index 79c76e2fd29cb54268af1e2a316603f63d26eded..495a72305be16d2d86d1fe738e4015b2e13b46eb 100644 (file)
@@ -59,10 +59,10 @@ void focus_cycle_indicator_startup(gboolean reconfig)
 
     if (reconfig) return;
 
-    focus_indicator.top.obwin.type = OB_WINDOW_CLASS_INTERNAL;
-    focus_indicator.left.obwin.type = OB_WINDOW_CLASS_INTERNAL;
-    focus_indicator.right.obwin.type = OB_WINDOW_CLASS_INTERNAL;
-    focus_indicator.bottom.obwin.type = OB_WINDOW_CLASS_INTERNAL;
+    focus_indicator.top.type = OB_WINDOW_CLASS_INTERNAL;
+    focus_indicator.left.type = OB_WINDOW_CLASS_INTERNAL;
+    focus_indicator.right.type = OB_WINDOW_CLASS_INTERNAL;
+    focus_indicator.bottom.type = OB_WINDOW_CLASS_INTERNAL;
 
     attr.override_redirect = True;
     attr.background_pixel = BlackPixel(obt_display, ob_screen);
@@ -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(obt_display, focus_indicator.top.window,
                           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(obt_display, focus_indicator.right.window);
         XMapWindow(obt_display, focus_indicator.bottom.window);
 
+        event_end_ignore_all_enters(ignore_start);
+
         visible = TRUE;
     }
 }
This page took 0.025237 seconds and 4 git commands to generate.