From 1e9be0de384d0750277b350c77e5e4a5d8a8ae10 Mon Sep 17 00:00:00 2001 From: Chris Feng Date: Wed, 2 Oct 2019 00:00:00 +0000 Subject: [PATCH] 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. --- exwm-workspace.el | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/exwm-workspace.el b/exwm-workspace.el index 736f46f..705da30 100644 --- a/exwm-workspace.el +++ b/exwm-workspace.el @@ -417,13 +417,19 @@ NIL if FRAME is not a workspace" (with-slots (y) (xcb:+request-unchecked+reply exwm--connection (make-instance 'xcb:GetGeometry - :drawable (frame-parameter frame 'exwm-outer-id))) + :drawable (frame-parameter frame + 'exwm-container))) (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))))))) + :drawable (frame-parameter frame + 'exwm-outer-id))) + (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) "Make frame FRAME active on its monitor."