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.
Dana Jansens danakj@orodu.net
1 files changed,
4 insertions(+),
4 deletions(-)
jump to
M
openbox/event.c
→
openbox/event.c
@@ -433,7 +433,7 @@ break;
} } -#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 @@ 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_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 @@ ObEventData ed;
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); } }