Fix detection of `exwm-workspace--window-y-offset'

* exwm-workspace.el (exwm-workspace--update-offsets): Explicitly
request the geometry of the container for the first workspace as it
may not align with the top of the root X window.
This commit is contained in:
Chris Feng 2019-10-02 00:00:00 +00:00
parent 9eed52ee2b
commit 1e9be0de38

View file

@ -417,13 +417,19 @@ NIL if FRAME is not a workspace"
(with-slots (y) (with-slots (y)
(xcb:+request-unchecked+reply exwm--connection (xcb:+request-unchecked+reply exwm--connection
(make-instance 'xcb:GetGeometry (make-instance 'xcb:GetGeometry
:drawable (frame-parameter frame 'exwm-outer-id))) :drawable (frame-parameter frame
'exwm-container)))
(with-slots ((y* y)) (with-slots ((y* y))
(xcb:+request-unchecked+reply exwm--connection (xcb:+request-unchecked+reply exwm--connection
(make-instance 'xcb:GetGeometry (make-instance 'xcb:GetGeometry
:drawable (frame-parameter frame 'exwm-id))) :drawable (frame-parameter frame
(setq exwm-workspace--frame-y-offset (- y* y) 'exwm-outer-id)))
exwm-workspace--window-y-offset (- (elt edges 1) y))))))) (with-slots ((y** y))
(xcb:+request-unchecked+reply exwm--connection
(make-instance 'xcb:GetGeometry
:drawable (frame-parameter frame 'exwm-id)))
(setq exwm-workspace--frame-y-offset (- y** y*)
exwm-workspace--window-y-offset (- (elt edges 1) y))))))))
(defun exwm-workspace--set-active (frame active) (defun exwm-workspace--set-active (frame active)
"Make frame FRAME active on its monitor." "Make frame FRAME active on its monitor."