diff options
author | Adrián Medraño Calvo <adrian@medranocalvo.com> | 2023-06-09T00·00+0000 |
---|---|---|
committer | Adrián Medraño Calvo <adrian@medranocalvo.com> | 2023-08-18T00·00+0000 |
commit | 67c5b316be03eb639bd0cda838579af27bb577b4 (patch) | |
tree | 176ca7601c49e862c0f2fa8967e2cf4d7db9ad07 /exwm-systemtray.el | |
parent | 4970d6ad4ef7c9cff92cbfb90a9ec379a61cd5e7 (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-systemtray.el')
-rw-r--r-- | exwm-systemtray.el | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/exwm-systemtray.el b/exwm-systemtray.el index 0f199866241d..acefd09d23af 100644 --- a/exwm-systemtray.el +++ b/exwm-systemtray.el @@ -38,6 +38,8 @@ (require 'exwm-core) (require 'exwm-workspace) +(declare-function exwm-workspace--workarea "exwm-workspace.el" (frame)) + (defclass exwm-systemtray--icon () ((width :initarg :width) (height :initarg :height) @@ -240,14 +242,13 @@ using 32-bit depth. Using `workspace-background' instead.") (setq x (+ x (slot-value (cdr pair) 'width) exwm-systemtray-icon-gap)) (setq map t))) - (let ((workarea (elt exwm-workspace--workareas - exwm-workspace-current-index))) + (let ((workarea (exwm-workspace--workarea exwm-workspace-current-index))) (xcb:+request exwm-systemtray--connection (make-instance 'xcb:ConfigureWindow :window exwm-systemtray--embedder-window :value-mask (logior xcb:ConfigWindow:X xcb:ConfigWindow:Width) - :x (- (aref workarea 2) x) + :x (- (slot-value workarea 'width) x) :width x))) (when map (xcb:+request exwm-systemtray--connection @@ -450,9 +451,9 @@ indicate how to support actual transparency." (frame-parameter exwm-workspace--current 'window-id)) :x 0 - :y (- (elt (elt exwm-workspace--workareas - exwm-workspace-current-index) - 3) + :y (- (slot-value (exwm-workspace--workarea + exwm-workspace-current-index) + 'height) exwm-workspace--frame-y-offset exwm-systemtray-height)))) (exwm-systemtray--refresh-background-color) @@ -471,9 +472,9 @@ indicate how to support actual transparency." (make-instance 'xcb:ConfigureWindow :window exwm-systemtray--embedder-window :value-mask xcb:ConfigWindow:Y - :y (- (elt (elt exwm-workspace--workareas - exwm-workspace-current-index) - 3) + :y (- (slot-value (exwm-workspace--workarea + exwm-workspace-current-index) + 'height) exwm-workspace--frame-y-offset exwm-systemtray-height)))) (exwm-systemtray--refresh)) @@ -567,9 +568,9 @@ indicate how to support actual transparency." (exwm-workspace--update-offsets) (setq frame exwm-workspace--current ;; Bottom aligned. - y (- (elt (elt exwm-workspace--workareas - exwm-workspace-current-index) - 3) + y (- (slot-value (exwm-workspace--workarea + exwm-workspace-current-index) + 'height) exwm-workspace--frame-y-offset exwm-systemtray-height))) (setq parent (string-to-number (frame-parameter frame 'window-id))) |