summaryrefslogtreecommitdiff
path: root/openbox/focus.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-04-22 20:33:12 +0000
committerDana Jansens <danakj@orodu.net>2007-04-22 20:33:12 +0000
commit3265ea9ac14a6cf05e3c2a462fdd81b7fe925c0a (patch)
treeffeed1272e07f3f742d218995a97d6cf15f98c77 /openbox/focus.c
parentafd88015b55da186a3e7777dadf2a1f572e85529 (diff)
when focusing nothing, make sure focus_client knows that nothing is focused
Diffstat (limited to 'openbox/focus.c')
-rw-r--r--openbox/focus.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/openbox/focus.c b/openbox/focus.c
index afedd000..f794e466 100644
--- a/openbox/focus.c
+++ b/openbox/focus.c
@@ -259,6 +259,7 @@ ObClient* focus_fallback_target(gboolean allow_refocus, ObClient *old)
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 @@ void focus_fallback(gboolean allow_refocus)
*/
focus_nothing();
- if ((new = focus_fallback_target(allow_refocus, focus_client)))
+ if ((new = focus_fallback_target(allow_refocus, old)))
client_focus(new);
}
@@ -278,6 +279,8 @@ void focus_nothing()
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,
event_curtime);