diff options
author | Vincent Ambo <mail@tazj.in> | 2023-06-05T21·38+0300 |
---|---|---|
committer | Vincent Ambo <mail@tazj.in> | 2023-06-05T21·40+0300 |
commit | ff967774565ac2d8d3f8c26242b03902718d20ec (patch) | |
tree | e6e723b71011a4fc3a35cba421a699d6d564fdb9 /third_party/exwm/exwm-layout.el | |
parent | 4ddfdc2ae0a9930c70af2d174be5c0d7c6912f3d (diff) | |
parent | b62d5e79b0c1799f2cd941b4cec5bf8492cb322c (diff) |
subtree(3p/exwm): update to commit 'b62d5e79' r/6230
This is almost one year of changes to EXWM. Note that it undoes our port of https://github.com/ch11ng/exwm/pull/737 That PR hasn't seen any movement in three years, so it might not be that relevant anymore. Other stuff has been mainlined in the meantime. Change-Id: I0845ff8a28a5bb1553855f6d6f0ceeaedcf0809e
Diffstat (limited to 'third_party/exwm/exwm-layout.el')
-rw-r--r-- | third_party/exwm/exwm-layout.el | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/third_party/exwm/exwm-layout.el b/third_party/exwm/exwm-layout.el index 9173a1c049df..ea186fe5a451 100644 --- a/third_party/exwm/exwm-layout.el +++ b/third_party/exwm/exwm-layout.el @@ -57,8 +57,6 @@ (declare-function exwm-input--grab-keyboard "exwm-input.el") (declare-function exwm-input-grab-keyboard "exwm-input.el") (declare-function exwm-workspace--active-p "exwm-workspace.el" (frame)) -(declare-function exwm-workspace--client-p "exwm-workspace.el" - (&optional frame)) (declare-function exwm-workspace--minibuffer-own-frame-p "exwm-workspace.el") (declare-function exwm-workspace--workspace-p "exwm-workspace.el" (workspace)) @@ -405,22 +403,28 @@ selected by `other-buffer'." (defun exwm-layout--on-minibuffer-setup () "Refresh layout when minibuffer grows." (exwm--log) - (unless (exwm-workspace--client-p) - (exwm--defer 0 (lambda () - (when (< 1 (window-height (minibuffer-window))) - (exwm-layout--refresh)))))) + ;; Only when active minibuffer's frame is an EXWM frame. + (let* ((mini-window (active-minibuffer-window)) + (frame (window-frame mini-window))) + (when (exwm-workspace--workspace-p frame) + (exwm--defer 0 (lambda () + (when (< 1 (window-height mini-window))) + (exwm-layout--refresh frame)))))) (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) - (not (exwm-workspace--client-p)) - (or (cl-position ?\n (current-message)) - (> (length (current-message)) - (frame-width exwm-workspace--current)))) - (exwm--log) - (if dirty - (exwm-layout--refresh) - (exwm--defer 0 #'exwm-layout--refresh)))) + (let ((frame (window-frame (active-minibuffer-window))) + (msg (current-message))) + ;; Check whether the frame where current window's minibuffer resides (not + ;; current window's frame for floating windows!) must be adjusted. + (when (and msg + (exwm-workspace--workspace-p frame) + (or (cl-position ?\n msg) + (> (length msg) (frame-width frame)))) + (exwm--log) + (if dirty + (exwm-layout--refresh exwm-workspace--current) + (exwm--defer 0 #'exwm-layout--refresh exwm-workspace--current))))) ;;;###autoload (defun exwm-layout-enlarge-window (delta &optional horizontal) |