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.
This commit is contained in:
Chris Feng 2016-08-01 19:53:04 +08:00
parent e7ff9a9f90
commit f04b041cae
3 changed files with 42 additions and 32 deletions

View file

@ -375,9 +375,12 @@ selected by `other-buffer'."
(exwm-layout--set-client-list-stacking)
(xcb:flush exwm--connection))))
(declare-function exwm-workspace--client-p "exwm-workspace.el"
(&optional frame))
(defun exwm-layout--on-minibuffer-setup ()
"Refresh layout when minibuffer grows."
(when (frame-parameter nil 'exwm-outer-id)
(unless (exwm-workspace--client-p)
(run-with-idle-timer 0.01 nil ;FIXME
(lambda ()
(when (< 1 (window-height (minibuffer-window)))
@ -386,8 +389,7 @@ selected by `other-buffer'."
(defun exwm-layout--on-echo-area-change (&optional dirty)
"Run when message arrives or in `echo-area-clear-hook' to refresh layout."
(when (and (current-message)
;; Exclude non-graphical frames.
(frame-parameter nil 'exwm-outer-id)
(not (exwm-workspace--client-p))
(or (cl-position ?\n (current-message))
(> (length (current-message))
(frame-width exwm-workspace--current))))