diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2015-08-13T04·02+0800 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2015-08-13T04·02+0800 |
commit | 07e59e0429c4b13a5036e9a207e37fc02135f599 (patch) | |
tree | d8bdf8d27ecdbbb115775e0ca8a1b4e4f91ea58f /exwm-layout.el | |
parent | 35560a49d6c03f96c1f62bfee72ee667cffadb9e (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-layout.el')
-rw-r--r-- | exwm-layout.el | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/exwm-layout.el b/exwm-layout.el index f2d4eb0cbeb9..a6b450f7daf5 100644 --- a/exwm-layout.el +++ b/exwm-layout.el @@ -111,8 +111,9 @@ xcb:ConfigWindow:Width xcb:ConfigWindow:Height) :x 0 :y 0 - :width (x-display-pixel-width) - :height (x-display-pixel-height)))) + :width (frame-pixel-width exwm-workspace--current) + :height (frame-pixel-height + exwm-workspace--current)))) (xcb:flush exwm--connection)) (xcb:+request exwm--connection (make-instance 'xcb:ConfigureWindow @@ -122,8 +123,8 @@ xcb:ConfigWindow:Width xcb:ConfigWindow:Height) :x 0 :y 0 - :width (x-display-pixel-width) - :height (x-display-pixel-height))) + :width (frame-pixel-width exwm-workspace--current) + :height (frame-pixel-height exwm-workspace--current))) (xcb:+request exwm--connection (make-instance 'xcb:ewmh:set-_NET_WM_STATE :window exwm--id @@ -168,11 +169,11 @@ (if (frame-parameter frame 'exwm-window-id) ;; Refresh a floating frame (progn - (cl-assert (eq major-mode 'exwm-mode)) - (let ((window (frame-first-window frame))) - (with-current-buffer (window-buffer window) - (exwm--log "Refresh floating window #x%x" exwm--id) - (exwm-layout--show exwm--id window)))) + (when (eq major-mode 'exwm-mode) + (let ((window (frame-first-window frame))) + (with-current-buffer (window-buffer window) + (exwm--log "Refresh floating window #x%x" exwm--id) + (exwm-layout--show exwm--id window))))) ;; Other frames (e.g. terminal/graphical frame of emacsclient) ;; We shall bury all `exwm-mode' buffers in this case (unless placeholder ;create the *scratch* buffer if it's killed |