summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-05-24 08:38:37 +0000
committerDana Jansens <danakj@orodu.net>2003-05-24 08:38:37 +0000
commitdc7a267af0b7e4f1240ea3b203e1b21a7224c179 (patch)
treebf8c442bd2f718eaa86f6287f76ce82d68d18188
parenta373b1582e4e40a4f126632a7528553e74fd26f2 (diff)
there's this case where we DONT want to ignore both events or we end up without anything we know of being focused, even tho something is. this case is now covered. ps i hate focus so much.
-rw-r--r--openbox/event.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/openbox/event.c b/openbox/event.c
index 478567f3..b6126464 100644
--- a/openbox/event.c
+++ b/openbox/event.c
@@ -341,14 +341,33 @@ static gboolean event_ignore(XEvent *e, Client *client)
g_message("found pending FocusIn");
#endif
/* is the focused window getting a FocusOut/In back to
- itself? */
+ itself?
+ */
if (fe.xfocus.window == e->xfocus.window &&
!event_ignore(&fe, client)) {
+ /*
+ if focus_client is not set, then we can't do
+ this. we need the FocusIn. This happens in the
+ case when the set_focus_client(NULL) in the
+ focus_fallback function fires and then
+ focus_fallback picks the currently focused
+ window (such as on a SendToDesktop-esque action.
+ */
+ if (focus_client) {
#ifdef DEBUG_FOCUS
- g_message("focused window got an Out/In back to "
- "itself IGNORED both");
+ g_message("focused window got an Out/In back to "
+ "itself IGNORED both");
#endif
- return TRUE;
+ return TRUE;
+ } else {
+ event_process(&fe);
+#ifdef DEBUG_FOCUS
+ g_message("focused window got an Out/In back to "
+ "itself but focus_client was null "
+ "IGNORED just the Out");
+#endif
+ return TRUE;
+ }
}
/* once all the FocusOut's have been dealt with, if there