From 87db8b42a33876818ad8ee6b950c1f2aaa73d3d5 Mon Sep 17 00:00:00 2001 From: Chris Feng Date: Sun, 1 Apr 2018 23:38:48 +0800 Subject: Preserve keyboard grab state after quitting fullscreen mode * exwm-layout.el (exwm-layout-set-fullscreen) (exwm-layout-unset-fullscreen, exwm-layout-toggle-fullscreen): Ditto. --- exwm-layout.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'exwm-layout.el') diff --git a/exwm-layout.el b/exwm-layout.el index 847dd36389dc..b74f512a4e2c 100644 --- a/exwm-layout.el +++ b/exwm-layout.el @@ -166,7 +166,7 @@ :data (vector xcb:Atom:_NET_WM_STATE_FULLSCREEN))) (xcb:flush exwm--connection) (cl-pushnew xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state) - (call-interactively #'exwm-input-release-keyboard))) + (exwm-input--release-keyboard exwm--id))) ;;;###autoload (cl-defun exwm-layout-unset-fullscreen (&optional id) @@ -193,7 +193,8 @@ (xcb:+request exwm--connection (make-instance 'xcb:ewmh:set-_NET_WM_STATE :window exwm--id :data [])) (xcb:flush exwm--connection) - (call-interactively #'exwm-input-grab-keyboard))) + (when exwm--keyboard-grabbed + (exwm-input--grab-keyboard exwm--id)))) ;;;###autoload (cl-defun exwm-layout-toggle-fullscreen (&optional id) @@ -204,7 +205,7 @@ (when id (with-current-buffer (exwm--id->buffer id) (if (exwm-layout--fullscreen-p) - (exwm-reset) + (exwm-layout-unset-fullscreen id) (exwm-layout-set-fullscreen id))))) (defun exwm-layout--other-buffer-predicate (buffer) -- cgit 1.4.1