From 4970d6ad4ef7c9cff92cbfb90a9ec379a61cd5e7 Mon Sep 17 00:00:00 2001 From: Fran Ley Date: Mon, 6 Mar 2023 16:46:47 -0800 Subject: More selectively ignore top and bottom struts For the case of vertical columns of workareas, top and bottom struts should only apply to workareas containing the respective edge of the strut offset. To simplify, imagine three monitors arranged vertically and one workarea per display: +-------+ | 1 | 2000x1000 px +-------+ | 2 | 2000x1000 px +-------+ | 3 | 2000x1000 px +-------+ In sexp form: ((0 0 2000 1000) (0 1000 2000 1000) (0 2000 2000 1000)) where each element represents a workarea as x, y, width, height And example struts of the form (offset-type offset (x-start x-end)) a.) (top 42 (0 2000)) b.) (top 1042 (0 2000)) c.) (top 2042 (0 2000)) d.) (bottom 42 (0 2000)) e.) (bottom 1042 (0 2000)) f.) (bottom 2042 (0 2000)) Workareas adjusted for struts before this change: a.) ((0 42 2000 958) (0 1000 2000 1000) (0 2000 2000 1000)) b.) ((0 1042 2000 -42) (0 1042 2000 958) (0 2000 2000 1000)) c.) ((0 2042 2000 -1042) (0 2042 2000 -42) (0 2042 2000 958)) d.) ((0 0 2000 1000) (0 1000 2000 1000) (0 2000 2000 902)) e.) ((0 0 2000 1000) (0 1000 2000 902) (0 2000 2000 -98)) f.) ((0 0 2000 902) (0 1000 2000 -98) (0 2000 2000 -1098)) Note that a. and d. are sensible, while b., c., e., and f. are quite user unfriendly. After this change, the same adjusted workareas are: a.) no change b.) ((0 0 2000 1000) (0 1042 2000 958) (0 2000 2000 1000)) c.) ((0 0 2000 1000) (0 1000 2000 1000) (0 2042 2000 958)) d.) no change e.) ((0 0 2000 1000) (0 1000 2000 902) (0 2000 2000 1000)) f.) ((0 0 2000 902) (0 1000 2000 1000) (0 2000 2000 1000)) The intent is to allow dock type windows such as typical status bars to occupy space in a workarea on any of a set of vertically arranged displays without occluding the other workareas due to the limitations of the X spec regarding strut offsets. Note that this behaviour conflicts with EWMH 1.3: > Struts MUST be specified in root window coordinates, that is, they are *not* relative to the edges of any view port or Xinerama monitor. but is accepted by multiple WMs. See: - https://blog.martin-graesslin.com/blog/2016/08/panels-on-shared-screen-edges/ - https://mail.gnome.org/archives/wm-spec-list/2009-November/msg00005.html - https://gitlab.freedesktop.org/xdg/xdg-specs/-/merge_requests/22 * exwm-workspace.el (exwm-workspace--update-workareas): Assume vertical struts apply from the monitor boundary when they cross them. Copyright-paperwork-exempt: yes --- exwm-workspace.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/exwm-workspace.el b/exwm-workspace.el index 06217a7769..1f60e80c63 100644 --- a/exwm-workspace.el +++ b/exwm-workspace.el @@ -377,7 +377,9 @@ NIL if FRAME is not a workspace" (or (not position) (< (max (aref position 0) (aref w 0)) (min (aref position 1) - (+ (aref w 0) (aref w 2)))))) + (+ (aref w 0) (aref w 2))))) + (< width (+ (aref w 1) (aref w 3))) + (> width (aref w 1))) (cl-incf (aref w 3) delta) (setf (aref w 1) width))) (`bottom @@ -386,7 +388,10 @@ NIL if FRAME is not a workspace" (or (not position) (< (max (aref position 0) (aref w 0)) (min (aref position 1) - (+ (aref w 0) (aref w 2)))))) + (+ (aref w 0) (aref w 2))))) + (< (- root-height width) + (+ (aref w 1) (aref w 3))) + (> (- root-height width) (aref w 1))) (cl-incf (aref w 3) delta)))))) ;; Save the result. (setq exwm-workspace--workareas workareas) -- cgit 1.4.1 From 67c5b316be03eb639bd0cda838579af27bb577b4 Mon Sep 17 00:00:00 2001 From: Adrián Medraño Calvo Date: Fri, 9 Jun 2023 00:00:00 +0000 Subject: 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. --- exwm-floating.el | 10 +-- exwm-manage.el | 10 +-- exwm-systemtray.el | 25 +++---- exwm-workspace.el | 187 +++++++++++++++++++++++++++-------------------------- 4 files changed, 114 insertions(+), 118 deletions(-) diff --git a/exwm-floating.el b/exwm-floating.el index 69e86a24e8..c8e433e272 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*))) diff --git a/exwm-manage.el b/exwm-manage.el index c3d47f7225..36da1932c5 100644 --- a/exwm-manage.el +++ b/exwm-manage.el @@ -157,7 +157,6 @@ want to match against EXWM internal variables such as `exwm-title', (defvar exwm-workspace--id-struts-alist) (defvar exwm-workspace--list) (defvar exwm-workspace--switch-history-outdated) -(defvar exwm-workspace--workareas) (defvar exwm-workspace-current-index) (declare-function exwm--update-class "exwm.el" (id &optional force)) (declare-function exwm--update-hints "exwm.el" (id &optional force)) @@ -178,6 +177,7 @@ want to match against EXWM internal variables such as `exwm-title', (declare-function exwm-workspace--set-fullscreen "exwm-workspace.el" (frame)) (declare-function exwm-workspace--update-struts "exwm-workspace.el" ()) (declare-function exwm-workspace--update-workareas "exwm-workspace.el" ()) +(declare-function exwm-workspace--workarea "exwm-workspace.el" (frame)) (defun exwm-manage--update-geometry (id &optional force) "Update window geometry." @@ -326,12 +326,8 @@ want to match against EXWM internal variables such as `exwm-title', (with-slots (x y width height) exwm--geometry ;; Center window of type _NET_WM_WINDOW_TYPE_SPLASH (when (memq xcb:Atom:_NET_WM_WINDOW_TYPE_SPLASH exwm-window-type) - (let* ((workarea (elt exwm-workspace--workareas - (exwm-workspace--position exwm--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 exwm--frame) (exwm--set-geometry id (+ x* (/ (- width* width) 2)) (+ y* (/ (- height* height) 2)) diff --git a/exwm-systemtray.el b/exwm-systemtray.el index 0f19986624..acefd09d23 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))) diff --git a/exwm-workspace.el b/exwm-workspace.el index 1f60e80c63..1bdc7245aa 100644 --- a/exwm-workspace.el +++ b/exwm-workspace.el @@ -162,6 +162,15 @@ NIL if FRAME is not a workspace" "Return t if FRAME is a workspace." (memq frame exwm-workspace--list)) +(defsubst exwm-workspace--workarea (frame) + "Return workarea corresponding to FRAME. +FRAME may be either a workspace frame or a workspace position." + (declare (indent defun)) + (elt exwm-workspace--workareas + (if (integerp frame) + frame + (exwm-workspace--position frame)))) + (defvar exwm-workspace--switch-map nil "Keymap used for interactively selecting workspace.") @@ -331,68 +340,68 @@ NIL if FRAME is not a workspace" (defun exwm-workspace--update-workareas () "Update `exwm-workspace--workareas'." - (let ((root-width (x-display-pixel-width)) - (root-height (x-display-pixel-height)) - workareas - edge width position - delta) - ;; Calculate workareas with no struts. - (if (frame-parameter (car exwm-workspace--list) 'exwm-geometry) - ;; Use the 'exwm-geometry' frame parameter if possible. - (dolist (f exwm-workspace--list) - (with-slots (x y width height) (frame-parameter f 'exwm-geometry) - (setq workareas (append workareas - (list (vector x y width height)))))) - ;; Fall back to use the screen size. - (let ((workarea (vector 0 0 root-width root-height))) - (setq workareas (make-list (exwm-workspace--count) workarea)))) + (let* ((root-width (x-display-pixel-width)) + (root-height (x-display-pixel-height)) + ;; Get workareas prior to struts. + (workareas (mapcar (lambda (f) + (or + ;; Use the 'exwm-geometry' frame parameter if + ;; possible. + (frame-parameter f 'exwm-geometry) + ;; Fall back to use the screen size. + (make-instance 'xcb:RECTANGLE + :x 0 + :y 0 + :width root-width + :height root-height))) + exwm-workspace--list))) ;; Exclude areas occupied by struts. (dolist (struts exwm-workspace--struts) - (setq edge (aref struts 0) - width (aref struts 1) - position (aref struts 2)) - (dolist (w workareas) - (pcase edge - ;; Left and top are always processed first. - (`left - (setq delta (- (aref w 0) width)) - (when (and (< delta 0) - (or (not position) - (< (max (aref position 0) (aref w 1)) - (min (aref position 1) - (+ (aref w 1) (aref w 3)))))) - (cl-incf (aref w 2) delta) - (setf (aref w 0) width))) - (`right - (setq delta (- root-width (aref w 0) (aref w 2) width)) - (when (and (< delta 0) - (or (not position) - (< (max (aref position 0) (aref w 1)) - (min (aref position 1) - (+ (aref w 1) (aref w 3)))))) - (cl-incf (aref w 2) delta))) - (`top - (setq delta (- (aref w 1) width)) - (when (and (< delta 0) - (or (not position) - (< (max (aref position 0) (aref w 0)) - (min (aref position 1) - (+ (aref w 0) (aref w 2))))) - (< width (+ (aref w 1) (aref w 3))) - (> width (aref w 1))) - (cl-incf (aref w 3) delta) - (setf (aref w 1) width))) - (`bottom - (setq delta (- root-height (aref w 1) (aref w 3) width)) - (when (and (< delta 0) - (or (not position) - (< (max (aref position 0) (aref w 0)) - (min (aref position 1) - (+ (aref w 0) (aref w 2))))) - (< (- root-height width) - (+ (aref w 1) (aref w 3))) - (> (- root-height width) (aref w 1))) - (cl-incf (aref w 3) delta)))))) + (let* ((edge (aref struts 0)) + (size (aref struts 1)) + (position (aref struts 2)) + (beg (and position (aref position 0))) + (end (and position (aref position 1))) + delta) + (dolist (w workareas) + (with-slots (x y width height) w + (pcase edge + ;; Left and top are always processed first. + (`left + (setq delta (- x size)) + (when (and (< delta 0) + (or (not position) + (< (max beg y) + (min end (+ y height))))) + (cl-incf width delta) + (setf x size))) + (`right + (setq delta (- root-width x width size)) + (when (and (< delta 0) + (or (not position) + (< (max beg y) + (min end (+ y height))))) + (cl-incf width delta))) + (`top + (setq delta (- y size)) + (when (and (< delta 0) + (or (not position) + (< (max beg x) + (min end (+ x width)))) + (< size (+ y height)) + (> size y)) + (cl-incf height delta) + (setf y size))) + (`bottom + (setq delta (- root-height y height size)) + (when (and (< delta 0) + (or (not position) + (< (max beg x) + (min end (+ x width)))) + (< (- root-height size) + (+ y height)) + (> (- root-height size) y)) + (cl-incf height delta)))))))) ;; Save the result. (setq exwm-workspace--workareas workareas) (xcb:flush exwm--connection)) @@ -444,24 +453,19 @@ NIL if FRAME is not a workspace" (defun exwm-workspace--set-fullscreen (frame) "Make frame FRAME fullscreen according to `exwm-workspace--workareas'." (exwm--log "frame=%s" frame) - (let ((workarea (elt exwm-workspace--workareas - (exwm-workspace--position frame))) - (id (frame-parameter frame 'exwm-outer-id)) - (container (frame-parameter frame 'exwm-container)) - x y width height) - (setq x (aref workarea 0) - y (aref workarea 1) - width (aref workarea 2) - height (aref workarea 3)) - (exwm--log "x=%s; y=%s; w=%s; h=%s" x y width height) - (when (and (eq frame exwm-workspace--current) - (exwm-workspace--minibuffer-own-frame-p)) - (exwm-workspace--resize-minibuffer-frame)) - (if (exwm-workspace--active-p frame) - (exwm--set-geometry container x y width height) - (exwm--set-geometry container x y 1 1)) - (exwm--set-geometry id nil nil width height) - (xcb:flush exwm--connection)) + (let ((id (frame-parameter frame 'exwm-outer-id)) + (container (frame-parameter frame 'exwm-container))) + (with-slots (x y width height) + (exwm-workspace--workarea frame) + (exwm--log "x=%s; y=%s; w=%s; h=%s" x y width height) + (when (and (eq frame exwm-workspace--current) + (exwm-workspace--minibuffer-own-frame-p)) + (exwm-workspace--resize-minibuffer-frame)) + (if (exwm-workspace--active-p frame) + (exwm--set-geometry container x y width height) + (exwm--set-geometry container x y 1 1)) + (exwm--set-geometry id nil nil width height) + (xcb:flush exwm--connection))) ;; This is only used for workspace initialization. (when exwm-workspace--fullscreen-frame-count (cl-incf exwm-workspace--fullscreen-frame-count))) @@ -469,20 +473,20 @@ NIL if FRAME is not a workspace" (defun exwm-workspace--resize-minibuffer-frame () "Resize minibuffer (and its container) to fit the size of workspace." (cl-assert (exwm-workspace--minibuffer-own-frame-p)) - (let ((workarea (elt exwm-workspace--workareas exwm-workspace-current-index)) + (let ((workarea (exwm-workspace--workarea exwm-workspace-current-index)) (container (frame-parameter exwm-workspace--minibuffer 'exwm-container)) y width) (setq y (if (eq exwm-workspace-minibuffer-position 'top) - (- (aref workarea 1) + (- (slot-value workarea 'y) exwm-workspace--attached-minibuffer-height) ;; Reset the frame size. (set-frame-height exwm-workspace--minibuffer 1) (redisplay) ;FIXME. - (+ (aref workarea 1) (aref workarea 3) + (+ (slot-value workarea 'y) (slot-value workarea 'height) (- (frame-pixel-height exwm-workspace--minibuffer)) exwm-workspace--attached-minibuffer-height)) - width (aref workarea 2)) + width (slot-value workarea 'width)) (xcb:+request exwm--connection (make-instance 'xcb:ConfigureWindow :window container @@ -493,7 +497,7 @@ NIL if FRAME is not a workspace" xcb:ConfigWindow:Sibling 0) xcb:ConfigWindow:StackMode) - :x (aref workarea 0) + :x (slot-value workarea 'x) :y y :width width :sibling exwm-manage--desktop @@ -1138,8 +1142,7 @@ Please check `exwm-workspace--minibuffer-own-frame-p' first." (defun exwm-workspace--on-ConfigureNotify (data _synthetic) "Adjust the container to fit the minibuffer frame." - (let ((obj (make-instance 'xcb:ConfigureNotify)) - workarea y) + (let ((obj (make-instance 'xcb:ConfigureNotify)) y) (xcb:unmarshal obj data) (with-slots (window height) obj (when (eq (frame-parameter exwm-workspace--minibuffer 'exwm-outer-id) @@ -1159,13 +1162,13 @@ Please check `exwm-workspace--minibuffer-own-frame-p' first." (when (/= (exwm-workspace--count) (length exwm-workspace--workareas)) ;; There is a chance the workareas are not updated timely. (exwm-workspace--update-workareas)) - (setq workarea (elt exwm-workspace--workareas - exwm-workspace-current-index) - y (if (eq exwm-workspace-minibuffer-position 'top) - (- (aref workarea 1) - exwm-workspace--attached-minibuffer-height) - (+ (aref workarea 1) (aref workarea 3) (- height) - exwm-workspace--attached-minibuffer-height))) + (with-slots ((y* y) (height* height)) + (exwm-workspace--workarea exwm-workspace-current-index) + (setq y (if (eq exwm-workspace-minibuffer-position 'top) + (- y* + exwm-workspace--attached-minibuffer-height) + (+ y* height* (- height) + exwm-workspace--attached-minibuffer-height)))) (xcb:+request exwm--connection (make-instance 'xcb:ConfigureWindow :window (frame-parameter exwm-workspace--minibuffer -- cgit 1.4.1 From 937da8645820ca5abee032c523cc2c72c6ce35e2 Mon Sep 17 00:00:00 2001 From: Adrián Medraño Calvo Date: Fri, 9 Jun 2023 00:00:00 +0000 Subject: Convert `delta' to the size the strut occupies in the workarea * exwm-workspace.el (exwm-workspace--update-workareas): Repurpose `delta' to be the positive size occupied by the strut in the workarea. --- exwm-workspace.el | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/exwm-workspace.el b/exwm-workspace.el index 1bdc7245aa..490d83acc5 100644 --- a/exwm-workspace.el +++ b/exwm-workspace.el @@ -368,40 +368,40 @@ FRAME may be either a workspace frame or a workspace position." (pcase edge ;; Left and top are always processed first. (`left - (setq delta (- x size)) - (when (and (< delta 0) + (setq delta (- size x)) + (when (and (< 0 delta) (or (not position) (< (max beg y) (min end (+ y height))))) - (cl-incf width delta) + (cl-decf width delta) (setf x size))) (`right - (setq delta (- root-width x width size)) - (when (and (< delta 0) + (setq delta (- size (- root-width x width))) + (when (and (< 0 delta) (or (not position) (< (max beg y) (min end (+ y height))))) - (cl-incf width delta))) + (cl-decf width delta))) (`top - (setq delta (- y size)) - (when (and (< delta 0) + (setq delta (- size y)) + (when (and (< 0 delta) (or (not position) (< (max beg x) (min end (+ x width)))) (< size (+ y height)) (> size y)) - (cl-incf height delta) + (cl-decf height delta) (setf y size))) (`bottom - (setq delta (- root-height y height size)) - (when (and (< delta 0) + (setq delta (- size (- root-height y height))) + (when (and (< 0 delta) (or (not position) (< (max beg x) (min end (+ x width)))) (< (- root-height size) (+ y height)) (> (- root-height size) y)) - (cl-incf height delta)))))))) + (cl-decf height delta)))))))) ;; Save the result. (setq exwm-workspace--workareas workareas) (xcb:flush exwm--connection)) -- cgit 1.4.1 From 23f1ca740d61d435a3bceadddecad8422a05d3fa Mon Sep 17 00:00:00 2001 From: Adrián Medraño Calvo Date: Fri, 9 Jun 2023 00:00:00 +0000 Subject: Selectively ignore left & right struts in horizontally aligned monitors * exwm-workspace.el (exwm-workspace--update-workareas): Simplify cross-monitor strut conditionals and apply them to horizontally aligned monitors. --- exwm-workspace.el | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/exwm-workspace.el b/exwm-workspace.el index 490d83acc5..626d29249e 100644 --- a/exwm-workspace.el +++ b/exwm-workspace.el @@ -370,6 +370,7 @@ FRAME may be either a workspace frame or a workspace position." (`left (setq delta (- size x)) (when (and (< 0 delta) + (< delta width) (or (not position) (< (max beg y) (min end (+ y height))))) @@ -378,6 +379,7 @@ FRAME may be either a workspace frame or a workspace position." (`right (setq delta (- size (- root-width x width))) (when (and (< 0 delta) + (< delta width) (or (not position) (< (max beg y) (min end (+ y height))))) @@ -385,22 +387,19 @@ FRAME may be either a workspace frame or a workspace position." (`top (setq delta (- size y)) (when (and (< 0 delta) + (< delta height) (or (not position) (< (max beg x) - (min end (+ x width)))) - (< size (+ y height)) - (> size y)) + (min end (+ x width))))) (cl-decf height delta) (setf y size))) (`bottom (setq delta (- size (- root-height y height))) (when (and (< 0 delta) + (< delta height) (or (not position) (< (max beg x) - (min end (+ x width)))) - (< (- root-height size) - (+ y height)) - (> (- root-height size) y)) + (min end (+ x width))))) (cl-decf height delta)))))))) ;; Save the result. (setq exwm-workspace--workareas workareas) -- cgit 1.4.1