Force repositioning floating Emacs frames

* exwm-floating.el (exwm-floating--set-floating): Ditto.
This commit is contained in:
Chris Feng 2017-05-07 18:40:08 +08:00
parent 2b7449ea42
commit 267ebd7f55

View file

@ -266,14 +266,15 @@ context of the corresponding buffer.")
;; FIXME: Strangely, the Emacs frame can move itself at this point ;; FIXME: Strangely, the Emacs frame can move itself at this point
;; when there are left/top struts set. Force resetting its ;; when there are left/top struts set. Force resetting its
;; position seems working, but it'd better to figure out why. ;; position seems working, but it'd better to figure out why.
(when exwm-workspace--struts ;; FIXME: This also happens in another case (#220) where the cause is
(xcb:+request exwm--connection ;; still unclear.
(make-instance 'xcb:ConfigureWindow (xcb:+request exwm--connection
:window outer-id (make-instance 'xcb:ConfigureWindow
:value-mask (logior xcb:ConfigWindow:X :window outer-id
xcb:ConfigWindow:Y) :value-mask (logior xcb:ConfigWindow:X
:x 0 :y 0)) xcb:ConfigWindow:Y)
(xcb:flush exwm--connection))) :x 0 :y 0))
(xcb:flush exwm--connection))
(with-current-buffer (exwm--id->buffer id) (with-current-buffer (exwm--id->buffer id)
(run-hooks 'exwm-floating-setup-hook)) (run-hooks 'exwm-floating-setup-hook))
;; Redraw the frame. ;; Redraw the frame.