{
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);
client_calc_layer(focus_out);
}
+ focus_hilite = focus_in;
+
if (focus_client != last) {
if (!focus_client)
focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS);