mirror of
https://github.com/emacs-exwm/exwm.git
synced 2024-11-30 16:07:59 +01:00
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.
This commit is contained in:
parent
937da86458
commit
23f1ca740d
1 changed files with 6 additions and 7 deletions
|
@ -370,6 +370,7 @@ FRAME may be either a workspace frame or a workspace position."
|
||||||
(`left
|
(`left
|
||||||
(setq delta (- size x))
|
(setq delta (- size x))
|
||||||
(when (and (< 0 delta)
|
(when (and (< 0 delta)
|
||||||
|
(< delta width)
|
||||||
(or (not position)
|
(or (not position)
|
||||||
(< (max beg y)
|
(< (max beg y)
|
||||||
(min end (+ y height)))))
|
(min end (+ y height)))))
|
||||||
|
@ -378,6 +379,7 @@ FRAME may be either a workspace frame or a workspace position."
|
||||||
(`right
|
(`right
|
||||||
(setq delta (- size (- root-width x width)))
|
(setq delta (- size (- root-width x width)))
|
||||||
(when (and (< 0 delta)
|
(when (and (< 0 delta)
|
||||||
|
(< delta width)
|
||||||
(or (not position)
|
(or (not position)
|
||||||
(< (max beg y)
|
(< (max beg y)
|
||||||
(min end (+ y height)))))
|
(min end (+ y height)))))
|
||||||
|
@ -385,22 +387,19 @@ FRAME may be either a workspace frame or a workspace position."
|
||||||
(`top
|
(`top
|
||||||
(setq delta (- size y))
|
(setq delta (- size y))
|
||||||
(when (and (< 0 delta)
|
(when (and (< 0 delta)
|
||||||
|
(< delta height)
|
||||||
(or (not position)
|
(or (not position)
|
||||||
(< (max beg x)
|
(< (max beg x)
|
||||||
(min end (+ x width))))
|
(min end (+ x width)))))
|
||||||
(< size (+ y height))
|
|
||||||
(> size y))
|
|
||||||
(cl-decf height delta)
|
(cl-decf height delta)
|
||||||
(setf y size)))
|
(setf y size)))
|
||||||
(`bottom
|
(`bottom
|
||||||
(setq delta (- size (- root-height y height)))
|
(setq delta (- size (- root-height y height)))
|
||||||
(when (and (< 0 delta)
|
(when (and (< 0 delta)
|
||||||
|
(< delta height)
|
||||||
(or (not position)
|
(or (not position)
|
||||||
(< (max beg x)
|
(< (max beg x)
|
||||||
(min end (+ x width))))
|
(min end (+ x width)))))
|
||||||
(< (- root-height size)
|
|
||||||
(+ y height))
|
|
||||||
(> (- root-height size) y))
|
|
||||||
(cl-decf height delta))))))))
|
(cl-decf height delta))))))))
|
||||||
;; Save the result.
|
;; Save the result.
|
||||||
(setq exwm-workspace--workareas workareas)
|
(setq exwm-workspace--workareas workareas)
|
||||||
|
|
Loading…
Reference in a new issue