summary refs log tree commit diff
path: root/calmwm.h
diff options
context:
space:
mode:
authorokan <okan>2013-12-12 20:15:07 +0000
committerokan <okan>2013-12-12 20:15:07 +0000
commitb276a2ef00a3333e0d474ad960c0e2b16880904d (patch)
treeb3e1b5f66735ecf4b7d6e70981064d59210f3f41 /calmwm.h
parente767ac9c6556d04c346b89e8d47d721c38cc366e (diff)
downloadcwm-b276a2ef00a3333e0d474ad960c0e2b16880904d.tar.gz
cwm-b276a2ef00a3333e0d474ad960c0e2b16880904d.tar.xz
cwm-b276a2ef00a3333e0d474ad960c0e2b16880904d.zip
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@
Diffstat (limited to 'calmwm.h')
-rw-r--r--calmwm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/calmwm.h b/calmwm.h
index 9dfe66a..c524fcf 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -316,6 +316,7 @@ struct mwm_hints {
 #define	MWM_DECOR_BORDER	(1<<1)
 
 extern Display				*X_Dpy;
+extern Time				 Last_Event_Time;
 extern struct screen_ctx_q		 Screenq;
 extern struct client_ctx_q		 Clientq;
 extern struct conf			 Conf;
@@ -381,7 +382,7 @@ void 			 client_htile(struct client_ctx *);
 void			 client_lower(struct client_ctx *);
 void			 client_map(struct client_ctx *);
 void			 client_maximize(struct client_ctx *);
-void			 client_msg(struct client_ctx *, Atom);
+void			 client_msg(struct client_ctx *, Atom, Time);
 void			 client_move(struct client_ctx *);
 struct client_ctx	*client_init(Window, struct screen_ctx *, int);
 void			 client_ptrsave(struct client_ctx *);