mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-27 13:07:59 +01:00
Fix unexpected focus change after a global key binding is activated
* exwm-core.el (exwm--unlock): Select FocusChange events on the root window. * exwm-input.el (exwm-input--on-FocusIn): Input focus should stay on the current workspace when the root window receives a FocusIn event.
This commit is contained in:
parent
c821f76dfe
commit
86f2215be3
2 changed files with 5 additions and 5 deletions
|
@ -93,7 +93,8 @@
|
|||
:window exwm--root
|
||||
:value-mask xcb:CW:EventMask
|
||||
:event-mask (eval-when-compile
|
||||
(logior xcb:EventMask:SubstructureRedirect
|
||||
(logior xcb:EventMask:FocusChange
|
||||
xcb:EventMask:SubstructureRedirect
|
||||
xcb:EventMask:StructureNotify))))
|
||||
(xcb:flush exwm--connection))
|
||||
|
||||
|
|
|
@ -218,10 +218,9 @@ ARGS are additional arguments to CALLBACK."
|
|||
(xcb:unmarshal obj data)
|
||||
(with-slots (mode) obj
|
||||
;; Revert input focus back to Emacs frame / X window when it's set on
|
||||
;; the root window or some workspace container.
|
||||
(when (eq mode xcb:NotifyMode:Normal)
|
||||
(x-focus-frame (selected-frame))
|
||||
(select-window (selected-window))))))
|
||||
;; the root window.
|
||||
(x-focus-frame exwm-workspace--current)
|
||||
(select-window (frame-selected-window exwm-workspace--current)))))
|
||||
|
||||
(defun exwm-input--on-EnterNotify (data _synthetic)
|
||||
"Handle EnterNotify events."
|
||||
|
|
Loading…
Reference in a new issue