1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:58:11 +00:00

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

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;