X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;h=9c47c04a3a49e42290a94bfea25dd6ba4adb122c;hb=2c50fae3479172c869b59f9128edc9a6eef69946;hp=d31b68c95c2d22cb818a3e7546171c4bf1009c89;hpb=3b4b52921adba74472904b37ec13d9c8d8686a10;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index d31b68c9..9c47c04a 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -489,7 +489,7 @@ static void event_process(const XEvent *ec, gpointer data) focus_left_screen = FALSE; - focus_fallback(FALSE, config_focus_under_mouse, TRUE); + focus_fallback(FALSE, config_focus_under_mouse, TRUE, TRUE); /* We don't get a FocusOut for this case, because it's just moving from our Inferior up to us. This happens when iconifying a @@ -498,10 +498,10 @@ static void event_process(const XEvent *ec, gpointer data) /* focus_set_client(NULL) has already been called */ client_calc_layer(client); } - if (e->xfocus.detail == NotifyPointerRoot || - e->xfocus.detail == NotifyDetailNone || - e->xfocus.detail == NotifyInferior || - e->xfocus.detail == NotifyNonlinear) + else if (e->xfocus.detail == NotifyPointerRoot || + e->xfocus.detail == NotifyDetailNone || + e->xfocus.detail == NotifyInferior || + e->xfocus.detail == NotifyNonlinear) { XEvent ce; @@ -541,7 +541,8 @@ static void event_process(const XEvent *ec, gpointer data) */ if (!focus_left_screen) - focus_fallback(FALSE, config_focus_under_mouse, TRUE); + focus_fallback(FALSE, config_focus_under_mouse, + TRUE, TRUE); } } else if (!client) @@ -597,7 +598,7 @@ static void event_process(const XEvent *ec, gpointer data) ob_debug_type(OB_DEBUG_FOCUS, "Focus went to an unmanaged window 0x%x !\n", ce.xfocus.window); - focus_fallback(TRUE, config_focus_under_mouse, TRUE); + focus_fallback(TRUE, config_focus_under_mouse, TRUE, TRUE); } } @@ -1504,7 +1505,8 @@ static void event_handle_client(ObClient *client, XEvent *e) } else if (msgtype == prop_atoms.net_wm_user_time) { guint32 t; - if (PROP_GET32(client->window, net_wm_user_time, cardinal, &t) && + if (client == focus_client && + PROP_GET32(client->window, net_wm_user_time, cardinal, &t) && t && !event_time_after(t, e->xproperty.time) && (!event_last_user_time || event_time_after(t, event_last_user_time)))