mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-27 13:07:59 +01:00
Fix some input focus issues
* Fix input focus lost after moving window to another workspace * Enhance `exwm-reset` to provide user a way to reset input focus when it's lost unexpectedly
This commit is contained in:
parent
3b9d0dd921
commit
52984898ec
2 changed files with 11 additions and 5 deletions
|
@ -189,6 +189,9 @@ The optional FORCE option is for internal use only."
|
||||||
;; Move the window itself
|
;; Move the window itself
|
||||||
(bury-buffer)
|
(bury-buffer)
|
||||||
(exwm-layout--hide id)
|
(exwm-layout--hide id)
|
||||||
|
;; Force update input focus
|
||||||
|
(setq exwm-input--focus-id xcb:Window:None)
|
||||||
|
(exwm-input--update-focus)
|
||||||
(xcb:+request exwm--connection
|
(xcb:+request exwm--connection
|
||||||
(make-instance 'xcb:ReparentWindow
|
(make-instance 'xcb:ReparentWindow
|
||||||
:window id
|
:window id
|
||||||
|
|
3
exwm.el
3
exwm.el
|
@ -198,6 +198,9 @@
|
||||||
(with-current-buffer (window-buffer)
|
(with-current-buffer (window-buffer)
|
||||||
(when (eq major-mode 'exwm-mode)
|
(when (eq major-mode 'exwm-mode)
|
||||||
(when exwm--fullscreen (exwm-layout-unset-fullscreen))
|
(when exwm--fullscreen (exwm-layout-unset-fullscreen))
|
||||||
|
;; Force update input focus
|
||||||
|
(setq exwm-input--focus-id xcb:Window:None)
|
||||||
|
(exwm-input--update-focus)
|
||||||
(exwm-input-grab-keyboard))))
|
(exwm-input-grab-keyboard))))
|
||||||
|
|
||||||
(defmacro exwm--with-current-id (id &rest body)
|
(defmacro exwm--with-current-id (id &rest body)
|
||||||
|
|
Loading…
Reference in a new issue