about summary refs log tree commit diff
path: root/exwm-manage.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2016-08-09T05·26+0800
committerChris Feng <chris.w.feng@gmail.com>2016-08-09T05·26+0800
commit767abdf9e6fa20699faccf7a3388ad2fa6a52b9f (patch)
tree00caed8feb2a42b7f098e853513d3c7a07607ce1 /exwm-manage.el
parent6e0b944c2de14fe67d292f3351bf4353f7b846d8 (diff)
Fix coordinates calculations concerning workspaces
* exwm-floating.el (exwm-floating--set-floating)
(exwm-floating--do-moveresize):
* exwm-manage.el (exwm-manage--manage-window):
Use the computed workareas rather than RandR output geometries.
Diffstat (limited to 'exwm-manage.el')
-rw-r--r--exwm-manage.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/exwm-manage.el b/exwm-manage.el
index 0b7b475590b3..b88312455def 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -170,15 +170,15 @@ corresponding buffer.")
                             exwm-window-type)
                       (memq xcb:Atom:_NET_WM_WINDOW_TYPE_DOCK
                             exwm-window-type))
-            (let ((frame-geometry (frame-parameter exwm-workspace--current
-                                                   'exwm-geometry))
-                  (workspace (frame-parameter exwm-workspace--current
-                                              'exwm-workspace)))
-              (when (and frame-geometry
-                         (/= x 0)
+            (let ((workspace (frame-parameter exwm-workspace--current
+                                              'exwm-workspace))
+                  workarea)
+              (when (and (/= x 0)
                          (/= y 0))
-                (setq x (- x (slot-value frame-geometry 'x))
-                      y (- y (slot-value frame-geometry 'y))))
+                (setq workarea (elt exwm-workspace--workareas
+                                    exwm-workspace-current-index)
+                      x (- x (aref workarea 0))
+                      y (- y (aref workarea 1))))
               (xcb:+request exwm--connection
                   (make-instance 'xcb:ReparentWindow
                                  :window id