summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-03-12 06:09:02 +0000
committerDana Jansens <danakj@orodu.net>2007-03-12 06:09:02 +0000
commitdc41c78a90e427e8b22789e413ebce69faf82975 (patch)
treec1c0a40de6c498e14bdcd6a2734aaec373ccaa29 /openbox
parent85a1a0cfb3e6f57b37d7a7b83132698b2d6cdee3 (diff)
focusins can occur on windows that aren't clients when there's latency involved. wm_torture proved this point. fallback in that situation. also fallback when nothing is focused.
Diffstat (limited to 'openbox')
-rw-r--r--openbox/event.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/openbox/event.c b/openbox/event.c
index 16ec8e0a..1f0d1559 100644
--- a/openbox/event.c
+++ b/openbox/event.c
@@ -433,7 +433,7 @@ static void event_process(const XEvent *ec, gpointer data)
}
}
-#if 1 /* focus debugging stuff */
+#if 0 /* focus debugging stuff */
if (e->type == FocusIn || e->type == FocusOut) {
gint mode = e->xfocus.mode;
gint detail = e->xfocus.detail;
@@ -664,7 +664,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
/* 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_set_client(NULL);
+ focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS);
} else if (ce.xany.window == e->xany.window) {
/* If focus didn't actually move anywhere, there is nothing to do*/
break;
@@ -674,8 +674,8 @@ static void event_handle_client(ObClient *client, XEvent *e)
event_process(&ce, &ed);
if (ed.ignored) {
/* The FocusIn was ignored, this means it was on a window
- that isn't a client? How did this happen? */
- g_assert_not_reached();
+ that isn't a client. */
+ focus_fallback(OB_FOCUS_FALLBACK_NOFOCUS);
}
}