about summary refs log tree commit diff
path: root/exwm-core.el
diff options
context:
space:
mode:
authorAdrián Medraño Calvo <adrian@medranocalvo.com>2018-10-21T12·00+0000
committerAdrián Medraño Calvo <adrian@medranocalvo.com>2018-10-21T12·00+0000
commiteb91ee2c77787bbeb1df74f0237f5087d031217f (patch)
tree04f11fab01f26a1fe7ad0351299b0254870c06f6 /exwm-core.el
parentdba1ed94c2e06b46da77a2aa80aa35e17b08fdd6 (diff)
Restore keyboard grabbing after exiting fullscreen
Recover the difference between the input mode selected by the user and
actual one, which might be transient.  This was inadvertently removed in
recent changes.

* exwm-core.el (exwm--selected-input-mode): New variable.
* exwm-input.el (exwm-input-grab-keyboard)
(exwm-input-release-keyboard): Use it.
* exwm-layout.el (exwm-layout-unset-fullscreen): Return to the
selected input mode.
Diffstat (limited to 'exwm-core.el')
-rw-r--r--exwm-core.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/exwm-core.el b/exwm-core.el
index 612a26f59fde..1f939491c5ef 100644
--- a/exwm-core.el
+++ b/exwm-core.el
@@ -158,7 +158,11 @@ least SECS seconds later."
 (defvar-local exwm--mode-line-format nil) ;save mode-line-format
 (defvar-local exwm--floating-frame-position nil) ;set when hidden.
 (defvar-local exwm--fixed-size nil)              ;fixed size
-(defvar-local exwm--input-mode 'line-mode)       ;Keyboard grabbed.
+(defvar-local exwm--selected-input-mode 'line-mode
+  "Input mode as selected by the user.
+One of `line-mode' or `char-mode'.")
+(defvar-local exwm--input-mode 'line-mode
+  "Actual input mode, i.e. whether mouse and keyboard are grabbed.")
 ;; Properties
 (defvar-local exwm--desktop nil "_NET_WM_DESKTOP.")
 (defvar-local exwm-window-type nil "_NET_WM_WINDOW_TYPE.")