From 810b4716a10169e1de29c52cf2e3aeb2e79f2018 Mon Sep 17 00:00:00 2001 From: Chris Feng Date: Tue, 9 Aug 2016 13:34:29 +0800 Subject: Update timestamp for WM_TAKE_FOCUS ClientMessage * exwm-input.el (exwm-input--timestamp-window) (exwm-input--timestamp-atom, exwm-input--timestamp-callback): New variables for updating timestamp. (exwm-input--set-focus): Send WM_TAKE_FOCUS ClientMessage with updated timestamp. (exwm-input--update-timestamp): New utility function for fetching timestamp. (exwm-input--on-PropertyNotify): New function for handling PropertyNotify event to extract the timestamp. (exwm-input--init): Create resources for updating timestamp; attach the event listener. (exwm-input--on-ButtonPress, exwm-input--on-KeyPress): * exwm.el (exwm--on-PropertyNotify): No longer update timestamp. * exwm-input.el (exwm-input--set-focus): Avoid setting input focus on already focused X windows, or when the input focus in not on a Emacs frame if globally active model is in use. * exwm-floating.el (exwm-floating--set-floating): * exwm-workspace.el (exwm-workspace-move-window) (exwm-workspace--add-frame-as-workspace, exwm-workspace--init): Set 'exwm-id' frame parameter as the numerical (inner) frame X ID. --- exwm-floating.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'exwm-floating.el') diff --git a/exwm-floating.el b/exwm-floating.el index 56d2932d2c..7c5d811bf5 100644 --- a/exwm-floating.el +++ b/exwm-floating.el @@ -99,7 +99,9 @@ context of the corresponding buffer.") (height . ,window-min-height) (unsplittable . t))))) ;and fix the size later (outer-id (string-to-number (frame-parameter frame 'outer-window-id))) - (container (buffer-local-value 'exwm--container (exwm--id->buffer id))) + (window-id (string-to-number (frame-parameter frame 'window-id))) + (container (buffer-local-value 'exwm--container + (exwm--id->buffer id))) (frame-container (xcb:generate-id exwm--connection)) (window (frame-first-window frame)) ;and it's the only window (x (slot-value exwm--geometry 'x)) @@ -118,6 +120,7 @@ context of the corresponding buffer.") width height x y) ;; Save frame parameters. (set-frame-parameter frame 'exwm-outer-id outer-id) + (set-frame-parameter frame 'exwm-id window-id) (set-frame-parameter frame 'exwm-container frame-container) ;; Fix illegal parameters ;; FIXME: check normal hints restrictions -- cgit 1.4.1