when focusing nothing, make sure focus_client knows that nothing is focused
Dana Jansens danakj@orodu.net
1 files changed,
4 insertions(+),
1 deletions(-)
jump to
M
openbox/focus.c
→
openbox/focus.c
@@ -259,6 +259,7 @@
void focus_fallback(gboolean allow_refocus) { ObClient *new; + ObClient *old = focus_client; /* unfocus any focused clients.. they can be focused by Pointer events and such, and then when I try focus them, I won't get a FocusIn event@@ -266,7 +267,7 @@ at all for them.
*/ focus_nothing(); - if ((new = focus_fallback_target(allow_refocus, focus_client))) + if ((new = focus_fallback_target(allow_refocus, old))) client_focus(new); }@@ -277,6 +278,8 @@ 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,