From: Dana Jansens Date: Wed, 8 Oct 2003 18:29:12 +0000 (+0000) Subject: use focus_hilite to ensure that when a wnidow thats not focused is hilighted, the... X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=723ecebc2f3d359bf1bf335702541769e895be0f;p=chaz%2Fopenbox use focus_hilite to ensure that when a wnidow thats not focused is hilighted, the hilight is removed when focus gets assigned --- diff --git a/openbox/event.c b/openbox/event.c index 8a15d789..11247d53 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -327,6 +327,15 @@ static void event_done(gpointer data) { static ObClient *last = NULL; + /* sometimes focus_hilite can be on an unfocused window, this make sure + it loses its focus hilite when focus moves */ + if (focus_hilite && + (focus_in && focus_hilite != focus_in) && + (focus_out && focus_hilite != focus_out)) + { + frame_adjust_focus(focus_hilite->frame, FALSE); + } + if (focus_in) { if (focus_in != focus_client) { focus_set_client(focus_in); @@ -341,6 +350,8 @@ static void event_done(gpointer data) client_calc_layer(focus_out); } + focus_hilite = focus_in; + if (focus_client != last) { if (!focus_client) focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS);