all repos — openbox @ c6fe4f8d8f4bd462ff9b1b1344422d0115cd5ff3

openbox fork - make it a bit more like ryudo

focus_order_remove is called in a few places. move the check for unsetting focus_client into client_unmanage.
Dana Jansens danakj@orodu.net
commit

c6fe4f8d8f4bd462ff9b1b1344422d0115cd5ff3

parent

ad852b6b56e43bdd7dda1389f54051cf92c0fad9

2 files changed, 5 insertions(+), 4 deletions(-)

jump to
M openbox/client.copenbox/client.c

@@ -535,6 +535,9 @@ XChangeSaveSet(ob_display, self->window, SetModeDelete);

/* update the focus lists */ 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); stacking_remove(self);
M openbox/focus.copenbox/focus.c

@@ -273,6 +273,8 @@ at all for them.

*/ focus_nothing(); + focus_client = NULL; + if ((new = focus_fallback_target(allow_refocus, old))) client_focus(new); }

@@ -284,8 +286,6 @@ if (focus_client != NULL) {

screen_install_colormap(focus_client, FALSE); screen_install_colormap(NULL, TRUE); } - - focus_client = NULL; /* when nothing will be focused, send focus to the backup target */ XSetInputFocus(ob_display, screen_support_win, RevertToPointerRoot,

@@ -763,8 +763,6 @@

void focus_order_remove(ObClient *c) { focus_order = g_list_remove(focus_order, c); - if (c == focus_client) - focus_client = NULL; } void focus_order_to_top(ObClient *c)