Fix 2 dock-related issues
* exwm-floating.el (exwm-floating--set-floating): Add a workaround to prevent accidental move of Emacs frame when struts are set. * exwm-workspace.el (exwm-workspace--update-workareas): Make legacy docks working.
This commit is contained in:
parent
1a716d3939
commit
c22f35620f
2 changed files with 29 additions and 13 deletions
|
|
@ -191,32 +191,36 @@ Value nil means to use the default position which is fixed at bottom, while
|
|||
(`left
|
||||
(setq delta (- (aref w 0) width))
|
||||
(when (and (< delta 0)
|
||||
(< (max (aref position 0) (aref w 1))
|
||||
(min (aref position 1)
|
||||
(+ (aref w 1) (aref w 3)))))
|
||||
(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)
|
||||
(< (max (aref position 0) (aref w 1))
|
||||
(min (aref position 1)
|
||||
(+ (aref w 1) (aref w 3)))))
|
||||
(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)
|
||||
(< (max (aref position 0) (aref w 0))
|
||||
(min (aref position 1)
|
||||
(+ (aref w 0) (aref w 2)))))
|
||||
(or (not position)
|
||||
(< (max (aref position 0) (aref w 0))
|
||||
(min (aref position 1)
|
||||
(+ (aref w 0) (aref w 2))))))
|
||||
(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)
|
||||
(< (max (aref position 0) (aref w 0))
|
||||
(min (aref position 1)
|
||||
(+ (aref w 0) (aref w 2)))))
|
||||
(or (not position)
|
||||
(< (max (aref position 0) (aref w 0))
|
||||
(min (aref position 1)
|
||||
(+ (aref w 0) (aref w 2))))))
|
||||
(cl-incf (aref w 3) delta))))))
|
||||
;; Save the result.
|
||||
(setq exwm-workspace--workareas workareas)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue