about summary refs log tree commit diff
path: root/exwm-floating.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2015-08-11T01·18+0800
committerChris Feng <chris.w.feng@gmail.com>2015-08-11T01·18+0800
commitb755296f547938d0f97d6aa49b8cb0d726de9eb9 (patch)
tree25d07bc390ca2d47ca0f00af17b0fdc90082681b /exwm-floating.el
parent24b964bb4af100b959a33215cc91b9c896c9359e (diff)
Remove redundant code caused by the concurrency of events (contd, 2)
* Remove locks that are no longer required
* Also fix #20 (inactive workspace frame steals input focus)
Diffstat (limited to 'exwm-floating.el')
-rw-r--r--exwm-floating.el8
1 files changed, 2 insertions, 6 deletions
diff --git a/exwm-floating.el b/exwm-floating.el
index bc7ee338466b..3971fa48126b 100644
--- a/exwm-floating.el
+++ b/exwm-floating.el
@@ -39,7 +39,6 @@
 (defun exwm-floating--set-floating (id)
   "Make window ID floating."
   (interactive)
-  (setq exwm-input--focus-lock t)
   (when (get-buffer-window (exwm--id->buffer id)) ;window in non-floating state
     (set-window-buffer (selected-window) (other-buffer))) ;hide it first
   (let* ((original-frame
@@ -167,13 +166,11 @@
       ;; FIXME: other conditions?
       (unless (memq xcb:Atom:_NET_WM_WINDOW_TYPE_UTILITY exwm-window-type)
         (x-focus-frame exwm--floating-frame)
-        (exwm-input--set-focus id)))
-    (setq exwm-input--focus-lock nil)))
+        (exwm-input--set-focus id)))))
 
 (defun exwm-floating--unset-floating (id)
   "Make window ID non-floating."
   (interactive)
-  (setq exwm-input--focus-lock t)
   (let ((buffer (exwm--id->buffer id)))
     ;; Reparent to workspace frame
     (xcb:+request exwm--connection
@@ -201,8 +198,7 @@
             exwm--frame exwm-workspace--current))
     (select-frame exwm-workspace--current t)
     (set-window-buffer nil buffer)
-    (exwm-input--set-focus id))
-  (setq exwm-input--focus-lock nil))
+    (exwm-input--set-focus id)))
 
 (defun exwm-floating-toggle-floating ()
   "Toggle the current window between floating and non-floating states."