mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-30 14:38:00 +01:00
Fix input focus stealing
This was fixed inb755296
but broken by04e4269
.
This commit is contained in:
parent
07e59e0429
commit
dba43b018d
1 changed files with 10 additions and 8 deletions
|
@ -112,20 +112,22 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.")
|
||||||
"Update input focus."
|
"Update input focus."
|
||||||
(when exwm-input--focus-window
|
(when exwm-input--focus-window
|
||||||
(with-current-buffer (window-buffer exwm-input--focus-window)
|
(with-current-buffer (window-buffer exwm-input--focus-window)
|
||||||
(exwm--log "Set focus on %s" exwm-input--focus-window)
|
|
||||||
(if (eq major-mode 'exwm-mode)
|
(if (eq major-mode 'exwm-mode)
|
||||||
(progn
|
(progn
|
||||||
(when exwm--floating-frame
|
(when exwm--floating-frame
|
||||||
(redirect-frame-focus exwm--floating-frame nil)
|
(redirect-frame-focus exwm--floating-frame nil)
|
||||||
(select-frame-set-input-focus exwm--floating-frame t))
|
(select-frame-set-input-focus exwm--floating-frame t))
|
||||||
|
(exwm--log "Set focus on #x%x" exwm--id)
|
||||||
(exwm-input--set-focus exwm--id))
|
(exwm-input--set-focus exwm--id))
|
||||||
(select-frame-set-input-focus (window-frame exwm-input--focus-window)
|
(when (eq (selected-window) exwm-input--focus-window)
|
||||||
t)
|
(exwm--log "Focus on %s" exwm-input--focus-window)
|
||||||
(dolist (pair exwm--id-buffer-alist)
|
(select-frame-set-input-focus (window-frame exwm-input--focus-window)
|
||||||
(with-current-buffer (cdr pair)
|
t)
|
||||||
(when (and exwm--floating-frame
|
(dolist (pair exwm--id-buffer-alist)
|
||||||
(eq exwm--frame exwm-workspace--current))
|
(with-current-buffer (cdr pair)
|
||||||
(redirect-frame-focus exwm--floating-frame exwm--frame)))))
|
(when (and exwm--floating-frame
|
||||||
|
(eq exwm--frame exwm-workspace--current))
|
||||||
|
(redirect-frame-focus exwm--floating-frame exwm--frame))))))
|
||||||
(setq exwm-input--focus-window nil))))
|
(setq exwm-input--focus-window nil))))
|
||||||
|
|
||||||
(defun exwm-input--finish-key-sequence ()
|
(defun exwm-input--finish-key-sequence ()
|
||||||
|
|
Loading…
Reference in a new issue