about summary refs log tree commit diff
path: root/exwm-floating.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2015-09-24T12·03+0800
committerChris Feng <chris.w.feng@gmail.com>2015-09-24T12·03+0800
commit4ad76b879d2f3807828de5345d5da4cac301415d (patch)
tree1c36764eec116f4e08efaaa9975e37a6d7d70206 /exwm-floating.el
parent22ee3e6c5ffdc73f231e7125f48827dc1d44237f (diff)
Fix a calculation error of the position of a floating frame
* exwm-floating.el (exwm-floating--set-floating): The position of a
  floating frame should be relative to its workspace.
Diffstat (limited to 'exwm-floating.el')
-rw-r--r--exwm-floating.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/exwm-floating.el b/exwm-floating.el
index 924f7cffca..0994cb9914 100644
--- a/exwm-floating.el
+++ b/exwm-floating.el
@@ -135,8 +135,8 @@
               (setq edges nil)))
           (if edges
               ;; Put at the center of leading window
-              (setq x (/ (- (+ (elt edges 2) (elt edges 0)) width) 2)
-                    y (/ (- (+ (elt edges 3) (elt edges 1)) height) 2))
+              (setq x (/ (- (elt edges 2) (elt edges 0) width) 2)
+                    y (/ (- (elt edges 3) (elt edges 1) height) 2))
             ;; Put at the center of screen
             (setq x (/ (- display-width width) 2)
                   y (/ (- display-height height) 2))))))