diff options
| author | Dana Jansens <danakj@orodu.net> | 2008-01-11 16:11:51 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2008-01-11 16:11:51 -0500 |
| commit | ea371936cec5f1e7f0eaed698b2cff6fab42f210 (patch) | |
| tree | 094b744c92ac2f11b2728dbc3c1af1a26e6f560d /openbox/focus_cycle_indicator.c | |
| parent | 746015e88c51dda43b26f35abc25050c502d319b (diff) | |
let you raise the focus target temporarily during focus cycling, with the <raise> option. also a new <bar> option lets you turn off the indicator bar
Diffstat (limited to 'openbox/focus_cycle_indicator.c')
| -rw-r--r-- | openbox/focus_cycle_indicator.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/openbox/focus_cycle_indicator.c b/openbox/focus_cycle_indicator.c index 79071314..5a6a1029 100644 --- a/openbox/focus_cycle_indicator.c +++ b/openbox/focus_cycle_indicator.c @@ -39,6 +39,7 @@ struct static RrAppearance *a_focus_indicator; static RrColor *color_white; +static gboolean visible; static Window create_window(Window parent, gulong mask, XSetWindowAttributes *attrib) @@ -53,6 +54,8 @@ void focus_cycle_indicator_startup(gboolean reconfig) { XSetWindowAttributes attr; + visible = FALSE; + if (reconfig) return; focus_indicator.top.obwin.type = Window_Internal; @@ -118,7 +121,7 @@ void focus_cycle_indicator_shutdown(gboolean reconfig) void focus_cycle_draw_indicator(ObClient *c) { - if (!c) { + if (!c && visible) { gulong ignore_start; /* kill enter events cause by this unmapping */ @@ -130,7 +133,10 @@ void focus_cycle_draw_indicator(ObClient *c) XUnmapWindow(ob_display, focus_indicator.bottom.win); event_end_ignore_all_enters(ignore_start); - } else { + + visible = FALSE; + } + else if (c) { /* if (c) frame_adjust_focus(c->frame, FALSE); @@ -249,5 +255,7 @@ void focus_cycle_draw_indicator(ObClient *c) XMapWindow(ob_display, focus_indicator.left.win); XMapWindow(ob_display, focus_indicator.right.win); XMapWindow(ob_display, focus_indicator.bottom.win); + + visible = TRUE; } } |
