From 38b09ba133911a0c47d4eeb8fc5cb09dcd9709a5 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Sun, 24 Oct 2021 17:46:29 +0200 Subject: [PATCH] WindowServer: Deduplicate code for mouse Z state in EventLoop --- Userland/Services/WindowServer/EventLoop.cpp | 3 +-- 1 file changed, 1 insertion(+), 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;