mirror of
https://github.com/emacs-exwm/exwm.git
synced 2025-02-18 19:44:22 +01:00
Don't leave the inner window behind when moving floating windows (#73)
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:
parent
f00b5ca655
commit
2f4e6fea7e
1 changed files with 16 additions and 5 deletions
|
@ -710,17 +710,28 @@ Float resizing is stopped when TYPE is nil."
|
||||||
:height height))
|
:height height))
|
||||||
(when (bufferp buffer-or-id)
|
(when (bufferp buffer-or-id)
|
||||||
;; Managed.
|
;; 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
|
(xcb:+request exwm--connection
|
||||||
(make-instance 'xcb:ConfigureWindow
|
(make-instance 'xcb:ConfigureWindow
|
||||||
:window (frame-parameter exwm--floating-frame
|
:window (frame-parameter exwm--floating-frame
|
||||||
'exwm-outer-id)
|
'exwm-outer-id)
|
||||||
:value-mask value-mask
|
:value-mask value-mask
|
||||||
:width width
|
: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))))
|
(xcb:flush exwm--connection))))
|
||||||
|
|
||||||
(defun exwm-floating-move (&optional delta-x delta-y)
|
(defun exwm-floating-move (&optional delta-x delta-y)
|
||||||
|
|
Loading…
Reference in a new issue