X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus_cycle_indicator.c;h=790713145d09a540e5c4f9a94b40e2593f06dd25;hb=0cfd92ab9e56d8f790c92b83436e981fa46efe20;hp=a8e0c2d603e587539c6f3cf3f9c1c0097543b125;hpb=eb09b1873d731a0e7290334a832a76cb233f34a7;p=chaz%2Fopenbox diff --git a/openbox/focus_cycle_indicator.c b/openbox/focus_cycle_indicator.c index a8e0c2d6..79071314 100644 --- a/openbox/focus_cycle_indicator.c +++ b/openbox/focus_cycle_indicator.c @@ -46,7 +46,7 @@ static Window create_window(Window parent, gulong mask, return XCreateWindow(ob_display, parent, 0, 0, 1, 1, 0, RrDepth(ob_rr_inst), InputOutput, RrVisual(ob_rr_inst), mask, attrib); - + } void focus_cycle_indicator_startup(gboolean reconfig) @@ -105,6 +105,11 @@ void focus_cycle_indicator_shutdown(gboolean reconfig) RrAppearanceFree(a_focus_indicator); + stacking_remove(INTERNAL_AS_WINDOW(&focus_indicator.top)); + stacking_remove(INTERNAL_AS_WINDOW(&focus_indicator.left)); + stacking_remove(INTERNAL_AS_WINDOW(&focus_indicator.right)); + stacking_remove(INTERNAL_AS_WINDOW(&focus_indicator.bottom)); + XDestroyWindow(ob_display, focus_indicator.top.win); XDestroyWindow(ob_display, focus_indicator.left.win); XDestroyWindow(ob_display, focus_indicator.right.win); @@ -114,13 +119,17 @@ void focus_cycle_indicator_shutdown(gboolean reconfig) void focus_cycle_draw_indicator(ObClient *c) { if (!c) { + gulong ignore_start; + + /* kill enter events cause by this unmapping */ + ignore_start = event_start_ignore_all_enters(); + XUnmapWindow(ob_display, focus_indicator.top.win); XUnmapWindow(ob_display, focus_indicator.left.win); XUnmapWindow(ob_display, focus_indicator.right.win); XUnmapWindow(ob_display, focus_indicator.bottom.win); - /* kill enter events cause by this unmapping */ - event_ignore_all_queued_enters(); + event_end_ignore_all_enters(ignore_start); } else { /* if (c) @@ -158,7 +167,7 @@ void focus_cycle_draw_indicator(ObClient *c) RrPaint(a_focus_indicator, focus_indicator.top.win, w, h); - x = c->area.x; + x = c->frame->area.x; y = c->frame->area.y; w = wl; h = c->frame->area.height;