about summary refs log tree commit diff
path: root/exwm-floating.el
diff options
context:
space:
mode:
authorAdrián Medraño Calvo <adrian@medranocalvo.com>2023-06-09T00·00+0000
committerAdrián Medraño Calvo <adrian@medranocalvo.com>2023-08-18T00·00+0000
commit67c5b316be03eb639bd0cda838579af27bb577b4 (patch)
tree176ca7601c49e862c0f2fa8967e2cf4d7db9ad07 /exwm-floating.el
parent4970d6ad4ef7c9cff92cbfb90a9ec379a61cd5e7 (diff)
Convert `exwm-workspace--workareas' to a list of `xcb:RECTANGLE's
* exwm-workspace.el (exwm-workspace--set-fullscreen)
(exwm-workspace--resize-minibuffer-frame)
(exwm-workspace--on-ConfigureNotify):
* exwm-floating.el (exwm-floating--set-floating):
* exwm-manage.el (exwm-manage--manage-window):
* exwm-systemtray.el (exwm-systemtray--refresh)
(exwm-systemtray--on-workspace-switch)
(exwm-systemtray--refresh-all, exwm-systemtray--init):
Adjust to `xcb:RECTANGLE'
workarea.
Diffstat (limited to 'exwm-floating.el')
-rw-r--r--exwm-floating.el10
1 files changed, 3 insertions, 7 deletions
diff --git a/exwm-floating.el b/exwm-floating.el
index 69e86a24e81b..c8e433e2721d 100644
--- a/exwm-floating.el
+++ b/exwm-floating.el
@@ -118,13 +118,13 @@ context of the corresponding buffer."
 (defvar exwm-workspace--current)
 (defvar exwm-workspace--frame-y-offset)
 (defvar exwm-workspace--window-y-offset)
-(defvar exwm-workspace--workareas)
 (declare-function exwm-layout--hide "exwm-layout.el" (id))
 (declare-function exwm-layout--iconic-state-p "exwm-layout.el" (&optional id))
 (declare-function exwm-layout--refresh "exwm-layout.el" ())
 (declare-function exwm-layout--show "exwm-layout.el" (id &optional window))
 (declare-function exwm-workspace--position "exwm-workspace.el" (frame))
 (declare-function exwm-workspace--update-offsets "exwm-workspace.el" ())
+(declare-function exwm-workspace--workarea "exwm-workspace.el" (frame))
 
 (defun exwm-floating--set-allowed-actions (id tilling)
   "Set _NET_WM_ALLOWED_ACTIONS."
@@ -186,12 +186,8 @@ context of the corresponding buffer."
     (set-frame-parameter frame 'exwm-container frame-container)
     ;; Fix illegal parameters
     ;; FIXME: check normal hints restrictions
-    (let* ((workarea (elt exwm-workspace--workareas
-                          (exwm-workspace--position original-frame)))
-           (x* (aref workarea 0))
-           (y* (aref workarea 1))
-           (width* (aref workarea 2))
-           (height* (aref workarea 3)))
+    (with-slots ((x* x) (y* y) (width* width) (height* height))
+        (exwm-workspace--workarea original-frame)
       ;; Center floating windows
       (when (and (or (= x 0) (= x x*))
                  (or (= y 0) (= y y*)))