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)
This commit is contained in:
Chris Feng 2015-08-11 09:18:21 +08:00
parent 24b964bb4a
commit b755296f54
4 changed files with 45 additions and 61 deletions

View file

@ -45,7 +45,6 @@ corresponding buffer.")
(defun exwm-manage--manage-window (id)
"Manage window ID."
(exwm--log "Try to manage #x%x" id)
(setq exwm-input--focus-lock t)
(catch 'return
;; Ensure it's not managed
(when (assoc id exwm--id-buffer-alist)
@ -136,10 +135,8 @@ corresponding buffer.")
(exwm-floating--unset-floating id))
(exwm-input-grab-keyboard id)
(exwm-workspace--update-switch-history)
(setq exwm-input--focus-lock nil) ;unlocked in advance
(with-current-buffer (exwm--id->buffer id)
(run-hooks 'exwm-manage-finish-hook))))
(setq exwm-input--focus-lock nil))
(run-hooks 'exwm-manage-finish-hook)))))
(defun exwm-manage--unmanage-window (id &optional withdraw-only)
"Unmanage window ID."