about summary refs log tree commit diff
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
commit23f1ca740d61d435a3bceadddecad8422a05d3fa (patch)
treeb02a7066255c04d31ec9ec4027121aa9d0416c30
parent937da8645820ca5abee032c523cc2c72c6ce35e2 (diff)
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.
-rw-r--r--exwm-workspace.el13
1 files changed, 6 insertions, 7 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 490d83acc5d8..626d29249eb0 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)