about summary refs log tree commit diff
path: root/exwm-layout.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2019-09-08T00·00+0000
committerChris Feng <chris.w.feng@gmail.com>2019-09-08T00·00+0000
commitccc4cce0e0df426f4eccb81479c4a773c488155d (patch)
treeb94658d071c04b7d0246983a471abca81d534240 /exwm-layout.el
parent323e919876e90a101c66f485a4b925dd49ae0a26 (diff)
Fix floating X window size with menu-bar/tool-bar enabled
* exwm-floating.el (exwm-floating--set-floating)
exwm-floating--do-moveresize)
exwm-layout.el (exwm-layout--show): Take menu-bar/tool-bar into
consideration.
Diffstat (limited to 'exwm-layout.el')
-rw-r--r--exwm-layout.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/exwm-layout.el b/exwm-layout.el
index 9ef516bd06b2..5644dbadc1af 100644
--- a/exwm-layout.el
+++ b/exwm-layout.el
@@ -102,11 +102,15 @@
          (y (pop edges))
          (width (- (pop edges) x))
          (height (- (pop edges) y))
-         frame-x frame-y frame-width frame-height)
+         geometry frame-x frame-y frame-width frame-height)
     (with-current-buffer (exwm--id->buffer id)
       (when exwm--floating-frame
         (setq frame-width (frame-pixel-width exwm--floating-frame)
-              frame-height (frame-pixel-height exwm--floating-frame))
+              geometry (frame-geometry exwm--floating-frame)
+              frame-height (+ (frame-pixel-height exwm--floating-frame)
+                              ;; Use `frame-outer-height' in the future.
+                              (or (cddr (assq 'menu-bar-size geometry)) 0)
+                              (or (cddr (assq 'tool-bar-size geometry)) 0)))
         (when exwm--floating-frame-position
           (setq frame-x (elt exwm--floating-frame-position 0)
                 frame-y (elt exwm--floating-frame-position 1)