X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus.c;h=013474d779ccb08ad3d8f199d02c0235510b36ea;hb=c2b0272fde966d655c2d55395235c0f233b6ba5d;hp=2db07b4d9125c4339a2d30f1146071dfd9b2a6b7;hpb=9eed0756a4b5b27276978a33310afd18540ec609;p=chaz%2Fopenbox diff --git a/openbox/focus.c b/openbox/focus.c index 2db07b4d..013474d7 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -49,7 +49,6 @@ struct { } focus_indicator; RrAppearance *a_focus_indicator; -RrColor *color_black; RrColor *color_white; static ObIconPopup *focus_cycle_popup; @@ -107,13 +106,13 @@ void focus_startup(gboolean reconfig) 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; @@ -141,7 +140,6 @@ void focus_shutdown(gboolean reconfig) /* reset focus to root */ XSetInputFocus(ob_display, PointerRoot, RevertToNone, event_lasttime); - RrColorFree(color_black); RrColorFree(color_white); RrAppearanceFree(a_focus_indicator); @@ -525,9 +523,8 @@ void focus_cycle(gboolean forward, gboolean linear, if (cancel) { 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; @@ -587,9 +584,8 @@ void focus_directional_cycle(ObDirection dir, if (cancel) { 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;