From 267ebd7f559cab0b864e0a31515d04c09a9f38e7 Mon Sep 17 00:00:00 2001 From: Chris Feng Date: Sun, 7 May 2017 18:40:08 +0800 Subject: [PATCH] Force repositioning floating Emacs frames * exwm-floating.el (exwm-floating--set-floating): Ditto. --- exwm-floating.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/exwm-floating.el b/exwm-floating.el index 2d1bf17..ea68cb5 100644 --- a/exwm-floating.el +++ b/exwm-floating.el @@ -266,14 +266,15 @@ context of the corresponding buffer.") ;; FIXME: Strangely, the Emacs frame can move itself at this point ;; when there are left/top struts set. Force resetting its ;; position seems working, but it'd better to figure out why. - (when exwm-workspace--struts - (xcb:+request exwm--connection - (make-instance 'xcb:ConfigureWindow - :window outer-id - :value-mask (logior xcb:ConfigWindow:X - xcb:ConfigWindow:Y) - :x 0 :y 0)) - (xcb:flush exwm--connection))) + ;; FIXME: This also happens in another case (#220) where the cause is + ;; still unclear. + (xcb:+request exwm--connection + (make-instance 'xcb:ConfigureWindow + :window outer-id + :value-mask (logior xcb:ConfigWindow:X + xcb:ConfigWindow:Y) + :x 0 :y 0)) + (xcb:flush exwm--connection)) (with-current-buffer (exwm--id->buffer id) (run-hooks 'exwm-floating-setup-hook)) ;; Redraw the frame.