focus_order_remove is called in a few places. move the check for unsetting focus_client into client_unmanage.
This commit is contained in:
parent
ad852b6b56
commit
c6fe4f8d8f
2 changed files with 5 additions and 4 deletions
|
@ -535,6 +535,9 @@ void client_unmanage(ObClient *self)
|
||||||
|
|
||||||
/* update the focus lists */
|
/* update the focus lists */
|
||||||
focus_order_remove(self);
|
focus_order_remove(self);
|
||||||
|
/* don't leave an invalid focus_client */
|
||||||
|
if (self == focus_client)
|
||||||
|
focus_client = NULL;
|
||||||
|
|
||||||
client_list = g_list_remove(client_list, self);
|
client_list = g_list_remove(client_list, self);
|
||||||
stacking_remove(self);
|
stacking_remove(self);
|
||||||
|
|
|
@ -273,6 +273,8 @@ void focus_fallback(gboolean allow_refocus)
|
||||||
*/
|
*/
|
||||||
focus_nothing();
|
focus_nothing();
|
||||||
|
|
||||||
|
focus_client = NULL;
|
||||||
|
|
||||||
if ((new = focus_fallback_target(allow_refocus, old)))
|
if ((new = focus_fallback_target(allow_refocus, old)))
|
||||||
client_focus(new);
|
client_focus(new);
|
||||||
}
|
}
|
||||||
|
@ -285,8 +287,6 @@ void focus_nothing()
|
||||||
screen_install_colormap(NULL, TRUE);
|
screen_install_colormap(NULL, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
focus_client = NULL;
|
|
||||||
|
|
||||||
/* when nothing will be focused, send focus to the backup target */
|
/* when nothing will be focused, send focus to the backup target */
|
||||||
XSetInputFocus(ob_display, screen_support_win, RevertToPointerRoot,
|
XSetInputFocus(ob_display, screen_support_win, RevertToPointerRoot,
|
||||||
event_curtime);
|
event_curtime);
|
||||||
|
@ -763,8 +763,6 @@ void focus_order_add_new(ObClient *c)
|
||||||
void focus_order_remove(ObClient *c)
|
void focus_order_remove(ObClient *c)
|
||||||
{
|
{
|
||||||
focus_order = g_list_remove(focus_order, c);
|
focus_order = g_list_remove(focus_order, c);
|
||||||
if (c == focus_client)
|
|
||||||
focus_client = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void focus_order_to_top(ObClient *c)
|
void focus_order_to_top(ObClient *c)
|
||||||
|
|
Loading…
Reference in a new issue