emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/exwm 84dad20 1/4: Allow selecting an X window from anot


From: Chris Feng
Subject: [elpa] externals/exwm 84dad20 1/4: Allow selecting an X window from another workspace
Date: Fri, 23 Sep 2016 10:54:46 +0000 (UTC)

branch: externals/exwm
commit 84dad20d6648638443bc7c731d7d60bbf0872bdb
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>

    Allow selecting an X window from another workspace
    
    * exwm-input.el (exwm-input--on-buffer-list-update): Filter out
    switch-frame events.
    (exwm-input--update-focus): Switch workspace to set input focus on an X
    window from another workspace.
---
 exwm-input.el |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/exwm-input.el b/exwm-input.el
index 8101cbd..b956f5c 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -160,6 +160,7 @@ This value should always be overwritten.")
   "Run in `buffer-list-update-hook' to track input focus."
   (when (and (not (minibufferp)) ;Do not set input focus on minibuffer window.
              (eq (current-buffer) (window-buffer)) ;e.g. `with-temp-buffer'.
+             (not (eq this-command #'handle-switch-frame))
              (not (exwm-workspace--client-p)))
     (setq exwm-input--update-focus-window (selected-window))
     (exwm-input--update-focus-defer)))
@@ -214,14 +215,7 @@ This value should always be overwritten.")
     (with-current-buffer (window-buffer window)
       (if (eq major-mode 'exwm-mode)
           (if (not (eq exwm--frame exwm-workspace--current))
-              ;; Do not focus X windows on other workspace.
-              (progn
-                (set-frame-parameter exwm--frame 'exwm-urgency t)
-                (setq exwm-workspace--switch-history-outdated t)
-                (force-mode-line-update)
-                ;; The application may have changed its input focus
-                (select-window
-                 (frame-selected-window exwm-workspace--current)))
+              (exwm-workspace-switch exwm--frame)
             (exwm--log "Set focus on #x%x" exwm--id)
             (exwm-input--set-focus exwm--id)
             (when exwm--floating-frame



reply via email to

[Prev in Thread] Current Thread [Next in Thread]