summaryrefslogtreecommitdiff
path: root/Userland/Services/WindowServer/EventLoop.cpp
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2021-10-24 17:46:29 +0200
committerAndreas Kling <kling@serenityos.org>2021-10-24 22:00:34 +0200
commit38b09ba133911a0c47d4eeb8fc5cb09dcd9709a5 (patch)
tree2a540b318ef05f71e17b0062e4ace2f80bd56537 /Userland/Services/WindowServer/EventLoop.cpp
parentbbaf8e3b70a4ad9790e50b1ed3259d53728f5d08 (diff)
downloadserenity-38b09ba133911a0c47d4eeb8fc5cb09dcd9709a5.zip
WindowServer: Deduplicate code for mouse Z state in EventLoop
Diffstat (limited to 'Userland/Services/WindowServer/EventLoop.cpp')
-rw-r--r--Userland/Services/WindowServer/EventLoop.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Userland/Services/WindowServer/EventLoop.cpp b/Userland/Services/WindowServer/EventLoop.cpp
index 872e6df3d2..fc20cda1f2 100644
--- a/Userland/Services/WindowServer/EventLoop.cpp
+++ b/Userland/Services/WindowServer/EventLoop.cpp
@@ -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;