mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-30 06:52:52 +00:00
WindowServer: Deduplicate code for mouse Z state in EventLoop
This commit is contained in:
parent
bbaf8e3b70
commit
38b09ba133
Notes:
sideshowbarker
2024-07-18 01:55:57 +09:00
Author: https://github.com/gmta
Commit: 38b09ba133
Pull-request: https://github.com/SerenityOS/serenity/pull/10624
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue