diff --git a/exwm-manage.el b/exwm-manage.el index ab66e29..c5c7932 100644 --- a/exwm-manage.el +++ b/exwm-manage.el @@ -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)))) diff --git a/exwm.el b/exwm.el index 537d616..83fe959 100644 --- a/exwm.el +++ b/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))