mirror of
https://github.com/emacs-exwm/exwm.git
synced 2025-01-22 16:08:00 +01:00
Add dont-steal-focus configuration property.
Some applications send _NET_ACTIVE_WINDOW to activate their window. EXWM respects this message always and brings such up into focus. This might be unintended and there should be a way to turn this off. In my case the app is Spotify desktop client installed from Flatpak. Fixes https://github.com/ch11ng/exwm/issues/732
This commit is contained in:
parent
14e78817f9
commit
a6e8db7220
2 changed files with 4 additions and 1 deletions
|
@ -65,6 +65,7 @@ possible choices:
|
|||
* prefix-keys: `exwm-input-prefix-keys' local to this X window.
|
||||
* simulation-keys: `exwm-input-simulation-keys' local to this X window.
|
||||
* workspace: The initial workspace.
|
||||
* dont-steal-focus: Ignore activation message for this X window.
|
||||
* managed: Force to manage (non-nil) or not manage (nil) the X window.
|
||||
|
||||
For each X window managed for the first time, matching criteria (sexps) are
|
||||
|
@ -98,6 +99,7 @@ want to match against EXWM internal variables such as `exwm-title',
|
|||
(alist :key-type (key-sequence :tag "From")
|
||||
:value-type (key-sequence :tag "To")))
|
||||
((const :tag "Workspace" workspace) integer)
|
||||
((const :tag "Don't steal focus" dont-steal-focus) boolean)
|
||||
((const :tag "Managed" managed) boolean)
|
||||
;; For forward compatibility.
|
||||
((other) sexp))))
|
||||
|
|
3
exwm.el
3
exwm.el
|
@ -494,7 +494,8 @@ DATA contains unmarshalled PropertyNotify event data."
|
|||
(if (buffer-live-p buffer)
|
||||
;; Either an `exwm-mode' buffer (an X window) or a floating frame.
|
||||
(with-current-buffer buffer
|
||||
(when (eq exwm--frame exwm-workspace--current)
|
||||
(when (and (eq exwm--frame exwm-workspace--current)
|
||||
(not (plist-get exwm--configurations 'dont-steal-focus)))
|
||||
(if exwm--floating-frame
|
||||
(select-frame exwm--floating-frame)
|
||||
(setq window (get-buffer-window nil t))
|
||||
|
|
Loading…
Reference in a new issue