X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;h=2ea7d30442a688f7bde0a2897169f5f2fbef6749;hb=2aa0a6b01ba718217e2b10107abbcd4236ba5a8f;hp=096e0d568e3b358869339ffda0f9f4b9c2a471dc;hpb=be3b78736fc171da4f14c99a22b858ad03237fd8;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index 096e0d56..2ea7d304 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -306,7 +306,9 @@ static gboolean wanted_focusevent(XEvent *e, gboolean in_client_only) /* This means focus reverted off of a client */ else if (detail == NotifyPointerRoot || detail == NotifyDetailNone || - detail == NotifyInferior) + detail == NotifyInferior || + /* This means focus got here from another screen */ + detail == NotifyNonlinear) return TRUE; else return FALSE; @@ -487,12 +489,20 @@ static void event_process(const XEvent *ec, gpointer data) } else if (e->type == FocusIn) { if (e->xfocus.detail == NotifyPointerRoot || e->xfocus.detail == NotifyDetailNone || - e->xfocus.detail == NotifyInferior) + e->xfocus.detail == NotifyInferior || + e->xfocus.detail == NotifyNonlinear) { XEvent ce; - ob_debug_type(OB_DEBUG_FOCUS, "Focus went to pointer root/none or" - " the frame window\n"); + ob_debug_type(OB_DEBUG_FOCUS, "Focus went to root, " + "pointer root/none or " + "the frame window\n"); + + if (e->xfocus.detail == NotifyInferior || + e->xfocus.detail == NotifyNonlinear) + { + focus_left_screen = FALSE; + } /* If another FocusIn is in the queue then don't fallback yet. This fixes the fun case of: @@ -1161,7 +1171,7 @@ static void event_handle_client(ObClient *client, XEvent *e) break; case ReparentNotify: /* this is when the client is first taken captive in the frame */ - if (e->xreparent.parent == client->frame->plate) break; + if (e->xreparent.parent == client->frame->window) break; /* This event is quite rare and is usually handled in unmapHandler.