about summary refs log tree commit diff
path: root/exwm-randr.el
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-02-06T21·43+0100
committerFelix Lange <fjl@twurst.com>2016-02-06T21·43+0100
commit00065234749054940563f59a0027a53bc5ebffad (patch)
tree5215c9f0965cc3c7e94cd39b14b39de30a9af26c /exwm-randr.el
parent97daba20ad22f05f2e4c1347ff86d6c957142a0a (diff)
Resize minibuffer only when it's in its own frame
0e4055d3392 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.
Diffstat (limited to 'exwm-randr.el')
-rw-r--r--exwm-randr.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/exwm-randr.el b/exwm-randr.el
index 7e0d9bab64fe..51161a455d87 100644
--- a/exwm-randr.el
+++ b/exwm-randr.el
@@ -103,8 +103,9 @@
                                          (frame-parameter frame
                                                           'exwm-workspace)
                                          x y width height)
-          (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))
           (setq workareas
                 (nconc workareas (list x y width (- height
                                                     workarea-offset)))