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
|
@ -181,14 +181,17 @@ The optional FORCE option is for internal use only."
|
|||
(if exwm--floating-frame
|
||||
;; Move the floating frame is enough
|
||||
(xcb:+request exwm--connection
|
||||
(make-instance 'xcb:ReparentWindow
|
||||
:window (frame-parameter exwm--floating-frame
|
||||
'exwm-outer-id)
|
||||
:parent (frame-parameter frame 'exwm-window-id)
|
||||
:x 0 :y 0))
|
||||
(make-instance 'xcb:ReparentWindow
|
||||
:window (frame-parameter exwm--floating-frame
|
||||
'exwm-outer-id)
|
||||
:parent (frame-parameter frame 'exwm-window-id)
|
||||
:x 0 :y 0))
|
||||
;; Move the window itself
|
||||
(bury-buffer)
|
||||
(exwm-layout--hide id)
|
||||
;; Force update input focus
|
||||
(setq exwm-input--focus-id xcb:Window:None)
|
||||
(exwm-input--update-focus)
|
||||
(xcb:+request exwm--connection
|
||||
(make-instance 'xcb:ReparentWindow
|
||||
:window id
|
||||
|
|
3
exwm.el
3
exwm.el
|
@ -198,6 +198,9 @@
|
|||
(with-current-buffer (window-buffer)
|
||||
(when (eq major-mode 'exwm-mode)
|
||||
(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))))
|
||||
|
||||
(defmacro exwm--with-current-id (id &rest body)
|
||||
|
|
Loading…
Reference in a new issue