} focus_indicator;
RrAppearance *a_focus_indicator;
-RrColor *color_black;
RrColor *color_white;
static ObIconPopup *focus_cycle_popup;
focus_indicator.right.obwin.type = Window_Internal;
focus_indicator.bottom.obwin.type = Window_Internal;
+ attr.save_under = True;
attr.override_redirect = True;
attr.background_pixel = BlackPixel(ob_display, ob_screen);
focus_indicator.top.win =
createWindow(RootWindow(ob_display, ob_screen),
- CWOverrideRedirect | CWBackPixel, &attr);
+ CWOverrideRedirect | CWBackPixel | CWSaveUnder,
+ &attr);
focus_indicator.left.win =
createWindow(RootWindow(ob_display, ob_screen),
- CWOverrideRedirect | CWBackPixel, &attr);
+ CWOverrideRedirect | CWBackPixel | CWSaveUnder,
+ &attr);
focus_indicator.right.win =
createWindow(RootWindow(ob_display, ob_screen),
- CWOverrideRedirect | CWBackPixel, &attr);
+ CWOverrideRedirect | CWBackPixel | CWSaveUnder,
+ &attr);
focus_indicator.bottom.win =
createWindow(RootWindow(ob_display, ob_screen),
- CWOverrideRedirect | CWBackPixel, &attr);
+ CWOverrideRedirect | CWBackPixel | CWSaveUnder,
+ &attr);
stacking_add(INTERNAL_AS_WINDOW(&focus_indicator.top));
stacking_add(INTERNAL_AS_WINDOW(&focus_indicator.left));
stacking_add(INTERNAL_AS_WINDOW(&focus_indicator.right));
stacking_add(INTERNAL_AS_WINDOW(&focus_indicator.bottom));
- color_black = RrColorNew(ob_rr_inst, 0, 0, 0);
color_white = RrColorNew(ob_rr_inst, 0xff, 0xff, 0xff);
a_focus_indicator = RrAppearanceNew(ob_rr_inst, 4);
a_focus_indicator->surface.grad = RR_SURFACE_SOLID;
a_focus_indicator->surface.relief = RR_RELIEF_FLAT;
- a_focus_indicator->surface.primary = color_black;
+ a_focus_indicator->surface.primary = RrColorNew(ob_rr_inst,
+ 0, 0, 0);
a_focus_indicator->texture[0].type = RR_TEXTURE_LINE_ART;
a_focus_indicator->texture[0].data.lineart.color = color_white;
a_focus_indicator->texture[1].type = RR_TEXTURE_LINE_ART;
/* reset focus to root */
XSetInputFocus(ob_display, PointerRoot, RevertToNone, event_lasttime);
- RrColorFree(color_black);
RrColorFree(color_white);
RrAppearanceFree(a_focus_indicator);
ObClient *ft = NULL;
if (cancel) {
- /*
- if (focus_cycle_target)
- frame_adjust_focus(focus_cycle_target->frame, FALSE);
- if (focus_client)
- frame_adjust_focus(focus_client->frame, TRUE);
- */
focus_cycle_target = NULL;
goto done_cycle;
- } else if (done && dialog) {
+ } else if (done)
goto done_cycle;
- }
if (!focus_order[screen_desktop])
goto done_cycle;
ObClient *ft = NULL;
if (cancel) {
- if (focus_cycle_target)
- frame_adjust_focus(focus_cycle_target->frame, FALSE);
- if (focus_client)
- frame_adjust_focus(focus_client->frame, TRUE);
focus_cycle_target = NULL;
goto done_cycle;
- } else if (done && dialog) {
+ } else if (done)
goto done_cycle;
- }
if (!focus_order[screen_desktop])
goto done_cycle;
if (ft) {
if (ft != focus_cycle_target) {/* prevents flicker */
- if (focus_cycle_target)
- frame_adjust_focus(focus_cycle_target->frame, FALSE);
focus_cycle_target = ft;
- frame_adjust_focus(focus_cycle_target->frame, TRUE);
+ focus_cycle_draw_indicator();
}
}
if (focus_cycle_target) {
first = NULL;
focus_cycle_target = NULL;
+ focus_cycle_draw_indicator();
popup_cycle(ft, FALSE);
return;