all repos — openbox @ d47c6a0979e420c74b4bfe1c38e9980517b3a29d

openbox fork - make it a bit more like ryudo

fallback is still getting x errors. instead, fallback when the client iconifies, and don't fallback when nothing has focus, send it to where we can control things though.
Dana Jansens danakj@orodu.net
commit

d47c6a0979e420c74b4bfe1c38e9980517b3a29d

parent

dc41c78a90e427e8b22789e413ebce69faf82975

2 files changed, 8 insertions(+), 3 deletions(-)

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

@@ -2426,6 +2426,10 @@ the list, put the new iconic window at the 'top of the

bottom'. */ focus_order_to_top(self); + /* Fall back focus since we're disappearing */ + if (focus_client == self) + client_unfocus(self); + changed = TRUE; } } else {

@@ -2992,8 +2996,9 @@ XSync(ob_display, FALSE);

return TRUE; } -/* Used when the current client is closed, focus_last will then prevent - * focus from going to the mouse pointer */ +/* Used when the current client is closed or otherwise hidden, focus_last will + then prevent focus from going to the mouse pointer +*/ void client_unfocus(ObClient *self) { if (focus_client == self) {
M openbox/event.copenbox/event.c

@@ -664,7 +664,7 @@ case FocusOut:

/* Look for the followup FocusIn */ if (!XCheckIfEvent(ob_display, &ce, look_for_focusin, NULL)) { /* There is no FocusIn, move focus where we can still hear events*/ - focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS); + focus_set_client(NULL); } else if (ce.xany.window == e->xany.window) { /* If focus didn't actually move anywhere, there is nothing to do*/ break;