From 5a0e425ef7a6420297d12dfe69f6a99d307f5984 Mon Sep 17 00:00:00 2001 From: okan Date: Thu, 12 Dec 2013 20:15:07 +0000 Subject: ICCCM explicitly states that server time (CurrentTime) should *not* be used for focus events, but rather the timestamp of the generated event. Track the last event timestamp and send it down for a WM_TAKE_FOCUS ClientMessage. I suspect we should do this for clients that don't announce this Atom as well, though the raciness gets us into a bind. Solves focus order issue since WM_TAKE_FOCUS; fix verified by sthen@ ok sthen@ --- xevents.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xevents.c') diff --git a/xevents.c b/xevents.c index f972ab9..e933ebb 100644 --- a/xevents.c +++ b/xevents.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: xevents.c,v 1.97 2013/12/11 15:41:11 okan Exp $ + * $OpenBSD: xevents.c,v 1.98 2013/12/12 20:15:07 okan Exp $ */ /* @@ -212,6 +212,8 @@ xev_handle_enternotify(XEvent *ee) XCrossingEvent *e = &ee->xcrossing; struct client_ctx *cc; + Last_Event_Time = e->time; + if ((cc = client_find(e->window)) != NULL) client_setactive(cc); } -- cgit v1.2.3-2-gb3c3