From 723ecebc2f3d359bf1bf335702541769e895be0f Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 8 Oct 2003 18:29:12 +0000 Subject: [PATCH] use focus_hilite to ensure that when a wnidow thats not focused is hilighted, the hilight is removed when focus gets assigned --- openbox/event.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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); -- 2.39.2