mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-30 06:28:01 +01:00
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.
This commit is contained in:
parent
67c5b316be
commit
937da86458
1 changed files with 12 additions and 12 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue