branch: externals/exwm
commit f52848595d44064bb092d3028a7f9afe1107faf1
Author: Chris Feng <chris.w.f...@gmail.com>
Commit: Chris Feng <chris.w.f...@gmail.com>

    ; * exwm-floating.el (exwm-floating--unset-floating): Reposition an X
    ; window when it changes from floating to tiling layout.
---
 exwm-floating.el |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/exwm-floating.el b/exwm-floating.el
index 7931c66..6702e38 100644
--- a/exwm-floating.el
+++ b/exwm-floating.el
@@ -277,6 +277,14 @@
             (make-instance 'xcb:ChangeWindowAttributes
                            :window id :value-mask xcb:CW:EventMask
                            :event-mask exwm--client-event-mask))
+        ;; The X window might have been moved due to the floating border.
+        (xcb:+request exwm--connection
+            (make-instance 'xcb:ConfigureWindow
+                           :window id
+                           :value-mask (logior xcb:ConfigWindow:X
+                                               xcb:ConfigWindow:Y)
+                           :x 0
+                           :y 0))
         ;; Reparent the floating frame back to the root window.
         (let ((frame-id (frame-parameter exwm--floating-frame 'exwm-outer-id))
               (frame-container (frame-parameter exwm--floating-frame

Reply via email to