bugfix(x11): Fix window position calculation overflow during dragging

Closes #3594

Signed-off-by: wannacu <wannacu2049@gmail.com>
This commit is contained in:
wannacu 2024-03-18 10:41:51 +08:00 committed by John Nunley
parent 3efa6d855d
commit 962241e2a0

View file

@ -1789,8 +1789,8 @@ impl UnownedWindow {
| xproto::EventMask::SUBSTRUCTURE_NOTIFY,
),
[
(window.x as u32 + xinput_fp1616_to_float(pointer.win_x) as u32),
(window.y as u32 + xinput_fp1616_to_float(pointer.win_y) as u32),
(window.x + xinput_fp1616_to_float(pointer.win_x) as i32) as u32,
(window.y + xinput_fp1616_to_float(pointer.win_y) as i32) as u32,
action.try_into().unwrap(),
1, // Button 1
1,