summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-03-24 00:46:21 +0000
committerDana Jansens <danakj@orodu.net>2003-03-24 00:46:21 +0000
commit137efd1367704aa39d139b59930c3d103ca7143f (patch)
treeb0c2c034b245910f0fdd7dfc3b510f8b1b811b48
parent7bb829f8b721b8b5a75740b2686fa12f63a798ff (diff)
more focus fixes. i wish this could end.
-rw-r--r--openbox/event.c33
-rw-r--r--openbox/openbox.c2
2 files changed, 21 insertions, 14 deletions
diff --git a/openbox/event.c b/openbox/event.c
index d3426109..ab0f8d8b 100644
--- a/openbox/event.c
+++ b/openbox/event.c
@@ -219,30 +219,37 @@ void event_process(XEvent *e)
event_lasttime = e->xproperty.time;
break;
case FocusIn:
+ if (e->xfocus.mode == NotifyGrab) return;
+/* if (e->type == FocusIn && window == focus_backup && focus_client != NULL) {
+*/
+ /* Something's focused but we got a focus event for the backup
+ window. this means that something unfocused before we received
+ the new FocusIn. Just ignore it, and refocus what should be
+ focused! */
+/* client_focus(focus_client);
+ return;
+ }
+*/
+ break;
case FocusOut:
- if (e->xfocus.mode == NotifyGrab)
+ if (e->xfocus.mode == NotifyGrab) return;
/*|| e.xfocus.mode == NotifyUngrab ||*/
-
/* From Metacity, from WindowMaker, ignore all funky pointer
root events. Its commented out cuz I don't think we need this
at all. If problems arise we can look into it */
/*e.xfocus.detail > NotifyNonlinearVirtual) */
- return; /* skip me! */
- if (e->type == FocusOut) {
- /* FocusOut events just make us look for FocusIn events. They
- are mostly ignored otherwise. */
- XEvent fi;
- if (XCheckTypedEvent(ob_display, FocusIn, &fi)) {
+
+ /* FocusOut events just make us look for FocusIn events. They
+ are mostly ignored otherwise. */
+ {
+ XEvent fi;
+ if (XCheckTypedEvent(ob_display, FocusIn, &fi)) {
event_process(&fi);
/* dont unfocus the window we just focused! */
if (fi.xfocus.window == e->xfocus.window)
return;
}
- } else if (window == focus_backup && focus_client != NULL)
- /* Something's focused but we got a focus event for the backup
- window. this means that something unfocused before we received
- the new FocusIn. Just ignore it. */
- return;
+ }
break;
case EnterNotify:
case LeaveNotify:
diff --git a/openbox/openbox.c b/openbox/openbox.c
index 46e6a864..fa31204f 100644
--- a/openbox/openbox.c
+++ b/openbox/openbox.c
@@ -49,7 +49,7 @@ State ob_state;
gboolean ob_shutdown = FALSE;
gboolean ob_restart = FALSE;
char *ob_restart_path = NULL;
-gboolean ob_remote = FALSE;
+gboolean ob_remote = TRUE;
gboolean ob_sync = FALSE;
Cursors ob_cursors;
char *ob_rc_path = NULL;