WindowServer: Deduplicate code for mouse Z state in EventLoop

This commit is contained in:
Jelle Raaijmakers 2021-10-24 17:46:29 +02:00 committed by Andreas Kling
parent bbaf8e3b70
commit 38b09ba133
Notes: sideshowbarker 2024-07-18 01:55:57 +09:00

View file

@ -94,12 +94,11 @@ void EventLoop::drain_mouse()
if (packet.is_relative) {
state.x += packet.x;
state.y -= packet.y;
state.z += packet.z;
} else {
state.x = packet.x;
state.y = packet.y;
state.z += packet.z;
}
state.z += packet.z;
if (packet.buttons != state.buttons) {
state.buttons = packet.buttons;