diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2016-08-01T11·53+0800 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2016-08-01T11·53+0800 |
commit | f04b041cae5b119355737a9272c683ea8a791d7b (patch) | |
tree | 935e384f31be909cfc2f7bcd630b46d60b2192a1 /exwm-input.el | |
parent | e7ff9a9f90f0356a9ab8a9ca3857df03deeb1696 (diff) |
Fix emacsclient issues
* exwm-workspace.el (exwm-workspace--client-p): New function for testing emacsclient frames. (exwm-workspace--update-minibuffer-height) (exwm-workspace--on-minibuffer-setup) (exwm-workspace--on-minibuffer-exit, exwm-workspace--on-echo-area-dirty) (exwm-workspace--on-echo-area-clear): * exwm-input.el (exwm-input--on-buffer-list-update) (exwm-input--on-minibuffer-setup): * exwm-layout.el (exwm-layout--on-minibuffer-setup) (exwm-layout--on-echo-area-change): Use it. * exwm-workspace.el (exwm-workspace--add-frame-as-workspace): Always clear the 'client' frame parameter. (exwm-workspace--init): Fix a typo.
Diffstat (limited to 'exwm-input.el')
-rw-r--r-- | exwm-input.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/exwm-input.el b/exwm-input.el index f218ea26e105..cbfd1dc7d3e0 100644 --- a/exwm-input.el +++ b/exwm-input.el @@ -79,6 +79,9 @@ It's updated in several occasions, and only used by `exwm-input--set-focus'.") (exwm-input--set-active-window id) (xcb:flush exwm--connection)))) +(declare-function exwm-workspace--client-p "exwm-workspace.el" + (&optional frame)) + (defvar exwm-input--update-focus-window nil "The (Emacs) window to be focused. This value should always be overwritten.") @@ -87,7 +90,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'. - (frame-parameter nil 'exwm-outer-id)) ;e.g. emacsclient frame. + (not (exwm-workspace--client-p))) (setq exwm-input--update-focus-window (selected-window)) (exwm-input--update-focus-defer))) @@ -183,8 +186,9 @@ This value should always be overwritten.") (defun exwm-input--on-minibuffer-setup () "Run in `minibuffer-setup-hook' to set input focus." - ;; Set input focus on the Emacs frame - (x-focus-frame (window-frame (minibuffer-selected-window)))) + (unless (exwm-workspace--client-p) + ;; Set input focus on the Emacs frame + (x-focus-frame (window-frame (minibuffer-selected-window))))) (defun exwm-input--set-active-window (&optional id) "Set _NET_ACTIVE_WINDOW." |