about summary refs log tree commit diff
path: root/exwm-manage.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2015-08-13T04·02+0800
committerChris Feng <chris.w.feng@gmail.com>2015-08-13T04·02+0800
commit07e59e0429c4b13a5036e9a207e37fc02135f599 (patch)
treed8bdf8d27ecdbbb115775e0ca8a1b4e4f91ea58f /exwm-manage.el
parent35560a49d6c03f96c1f62bfee72ee667cffadb9e (diff)
Fix multi-screen bugs
* RandR module is now made optional; users can enable it with
  `exwm-randr-enable`.
* Correct the calculation of sizes/coordinates at various places.
* Input focus is now tracked with (Emacs) window instead of buffer since the
  latter can be ambiguous in multi-screen settings.
Diffstat (limited to 'exwm-manage.el')
-rw-r--r--exwm-manage.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/exwm-manage.el b/exwm-manage.el
index d1736ff9a4cf..4f11874d3a3e 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -98,8 +98,14 @@ corresponding buffer.")
                                :window id
                                :value-mask (logior xcb:ConfigWindow:X
                                                    xcb:ConfigWindow:Y)
-                               :x (/ (- (x-display-pixel-width) width) 2)
-                               :y (/ (- (x-display-pixel-height) height) 2)))))
+                               :x (/ (- (frame-pixel-width
+                                         exwm-workspace--current)
+                                        width)
+                                     2)
+                               :y (/ (- (frame-pixel-height
+                                         exwm-workspace--current)
+                                        height)
+                                     2)))))
         (xcb:flush exwm--connection)
         (setq kill-buffer-query-functions nil)
         (setq exwm--id-buffer-alist (assq-delete-all id exwm--id-buffer-alist))
@@ -277,7 +283,8 @@ corresponding buffer.")
             (setq edges
                   (if exwm--fullscreen
                       (list 0 0
-                            (x-display-pixel-width) (x-display-pixel-height))
+                            (frame-pixel-width exwm-workspace--current)
+                            (frame-pixel-height exwm-workspace--current))
                     (or exwm--floating-edges
                         (window-inside-absolute-pixel-edges
                          (get-buffer-window)))))