X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fevent.c;h=14aa696bb119689bca9f110947b1c13fe857b682;hb=4418e6988b5ea80acf0dee4f27a43b27a1fdf48f;hp=f466234bc2e25b235214ed8c63f14cc13c7472c3;hpb=4f93731cdbecbf43b82aa000c07ec8b40f97dd03;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index f466234b..14aa696b 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -1357,11 +1357,23 @@ static void event_handle_client(ObClient *client, XEvent *e) (e->xclient.data.l[0] == 2 ? "user" : "INVALID")))); /* XXX make use of data.l[2] !? */ if (e->xclient.data.l[0] == 1 || e->xclient.data.l[0] == 2) { - event_curtime = e->xclient.data.l[1]; + /* we can not trust the timestamp from applications. + e.g. chromium passes a very old timestamp. openbox thinks + the window will get focus and calls XSetInputFocus with the + (old) timestamp, which doesn't end up moving focus at all. + but the window is raised, not hilited, etc, as if it was + really going to get focus. + + so do not use this timestamp in event_curtime, as this would + be used in XSetInputFocus. + */ + /*event_curtime = e->xclient.data.l[1];*/ if (e->xclient.data.l[1] == 0) ob_debug_type(OB_DEBUG_APP_BUGS, "_NET_ACTIVE_WINDOW message for window %s is" " missing a timestamp", client->title); + + event_curtime = event_get_server_time(); } else ob_debug_type(OB_DEBUG_APP_BUGS, "_NET_ACTIVE_WINDOW message for window %s is "