2
0
Fork 0
mirror of https://github.com/emacs-exwm/exwm.git synced 2025-04-17 08:44:00 +02:00

Don't leave the inner window behind when moving floating windows ()

Previously, EXWM would leave the inner window behind when dragging
around floating windows until the mouse was released. Now, the inner
window will be dragged along without any lag.

* exwm-floating.el (exwm-floating--do-moveresize): drag the inner window
along with the outer window.
This commit is contained in:
Steven Allen 2024-08-18 14:33:09 +00:00 committed by GitHub
parent f00b5ca655
commit 2f4e6fea7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -710,17 +710,28 @@ Float resizing is stopped when TYPE is nil."
:height height))
(when (bufferp buffer-or-id)
;; Managed.
(setq value-mask (logand value-mask (logior xcb:ConfigWindow:Width
xcb:ConfigWindow:Height)))
(when (/= 0 value-mask)
(with-current-buffer buffer-or-id
(with-current-buffer buffer-or-id
(let ((resize-value-mask
(logand value-mask (logior xcb:ConfigWindow:Width
xcb:ConfigWindow:Height)))
(move-value-mask
(logand value-mask (logior xcb:ConfigWindow:X
xcb:ConfigWindow:Y))))
(when (/= 0 resize-value-mask)
(xcb:+request exwm--connection
(make-instance 'xcb:ConfigureWindow
:window (frame-parameter exwm--floating-frame
'exwm-outer-id)
:value-mask value-mask
:width width
:height height)))))
:height height)))
(when (/= 0 move-value-mask)
(xcb:+request exwm--connection
(make-instance 'xcb:ConfigureWindow
:window exwm--id
:value-mask value-mask
:x (+ x exwm-floating-border-width)
:y (+ y exwm-floating-border-width)))))))
(xcb:flush exwm--connection))))
(defun exwm-floating-move (&optional delta-x delta-y)