about summary refs log tree commit diff
path: root/exwm-floating.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2016-04-07T13·03+0800
committerChris Feng <chris.w.feng@gmail.com>2016-04-07T13·03+0800
commitddbbeda285b3b671ace99f1688e6bd3c3f84c742 (patch)
tree54a3824e9f02d6f353464d0eefaeabf34f46213d /exwm-floating.el
parentc7c233bc356fc6a846a09aa5fb13710e6706fce1 (diff)
Fix 2 multi-monitor issues
* exwm-workspace.el (exwm-workspace--on-focus-in, exwm-workspace--init):
Handle unexpected frame switch in `focus-in-hook'.

* exwm-floating.el (exwm-floating--set-floating): If the absolute position
is (0, 0) then the relative position is also the same.
Diffstat (limited to 'exwm-floating.el')
-rw-r--r--exwm-floating.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/exwm-floating.el b/exwm-floating.el
index a67bc1977e..770976d2d3 100644
--- a/exwm-floating.el
+++ b/exwm-floating.el
@@ -91,7 +91,9 @@
          (frame-geometry (frame-parameter original-frame 'exwm-geometry)))
     (exwm--log "Floating geometry (original, absolute): %dx%d%+d%+d"
                width height x y)
-    (when frame-geometry
+    (when (and frame-geometry
+               (/= x 0)
+               (/= y 0))
       (setq x (- x (slot-value frame-geometry 'x))
             y (- y (slot-value frame-geometry 'y))))
     (exwm--log "Floating geometry (original, relative): %dx%d%+d%+d"