Resize minibuffer only when it's in its own frame
0e4055d339 introduced a few calls to exwm-workspace--resize-minibuffer
in various places. This function only works when the minibuffer is
displayed in its own frame but was called unconditionally in some cases.
Fix it by wrapping all calls in an appropriate conditional and add an
assertion. Also rename the function so it is clearer that it resizes a
frame, which might prevent calling it unconditionally in the future.
This commit is contained in:
parent
97daba20ad
commit
0006523474
4 changed files with 17 additions and 10 deletions
|
|
@ -203,8 +203,9 @@
|
|||
(id (frame-parameter frame 'exwm-outer-id))
|
||||
(workspace (frame-parameter frame 'exwm-workspace)))
|
||||
(with-slots (x y width height) geometry
|
||||
(when (eq frame exwm-workspace--current)
|
||||
(exwm-workspace--resize-minibuffer width height))
|
||||
(when (and (eq frame exwm-workspace--current)
|
||||
(exwm-workspace--minibuffer-own-frame-p))
|
||||
(exwm-workspace--resize-minibuffer-frame width height))
|
||||
(exwm-layout--resize-container id workspace x y width height)
|
||||
(xcb:flush exwm--connection))))
|
||||
|
||||
|
|
@ -395,7 +396,7 @@ See also `exwm-layout-enlarge-window'."
|
|||
"Initialize layout module."
|
||||
;; Auto refresh layout
|
||||
(add-hook 'window-configuration-change-hook #'exwm-layout--refresh)
|
||||
(unless (memq exwm-workspace-minibuffer-position '(top bottom))
|
||||
(unless (exwm-workspace--minibuffer-own-frame-p)
|
||||
;; Refresh when minibuffer grows
|
||||
(add-hook 'minibuffer-setup-hook #'exwm-layout--on-minibuffer-setup t)
|
||||
(run-with-idle-timer 0 t #'exwm-layout--on-echo-area-change t)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue