diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2016-07-18T04·55+0800 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2016-07-18T04·55+0800 |
commit | c22f35620f0db3e86f4b0678a29dc3eee48df4d9 (patch) | |
tree | 3f31aa278a5f19614f67b5be3b8babcf678b1242 /exwm-workspace.el | |
parent | 1a716d39397edfc2a083c479817ea7d40b23fd54 (diff) |
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.
Diffstat (limited to 'exwm-workspace.el')
-rw-r--r-- | exwm-workspace.el | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el index a7e668110a12..5c8279ede905 100644 --- a/exwm-workspace.el +++ b/exwm-workspace.el @@ -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) |