about summary refs log tree commit diff
path: root/exwm-workspace.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2015-08-08T03·16+0800
committerChris Feng <chris.w.feng@gmail.com>2015-08-08T03·16+0800
commit52984898ec8d59fe42e86a311c7e7dbeec95c611 (patch)
tree85185f87b8e82844cd40f1590884e446ee0b26f9 /exwm-workspace.el
parent3b9d0dd9217add078415ecda644b5cd19632f1fc (diff)
Fix some input focus issues
* Fix input focus lost after moving window to another workspace
* Enhance `exwm-reset` to provide user a way to reset input focus when it's
  lost unexpectedly
Diffstat (limited to 'exwm-workspace.el')
-rw-r--r--exwm-workspace.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el
index da3f9ce4bce6..efecf571db85 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -181,14 +181,17 @@ The optional FORCE option is for internal use only."
         (if exwm--floating-frame
             ;; Move the floating frame is enough
             (xcb:+request exwm--connection
-            (make-instance 'xcb:ReparentWindow
-                           :window (frame-parameter exwm--floating-frame
-                                                    'exwm-outer-id)
-                           :parent (frame-parameter frame 'exwm-window-id)
-                           :x 0 :y 0))
+                (make-instance 'xcb:ReparentWindow
+                               :window (frame-parameter exwm--floating-frame
+                                                        'exwm-outer-id)
+                               :parent (frame-parameter frame 'exwm-window-id)
+                               :x 0 :y 0))
           ;; Move the window itself
           (bury-buffer)
           (exwm-layout--hide id)
+          ;; Force update input focus
+          (setq exwm-input--focus-id xcb:Window:None)
+          (exwm-input--update-focus)
           (xcb:+request exwm--connection
               (make-instance 'xcb:ReparentWindow
                              :window id