summaryrefslogtreecommitdiff
path: root/Userland/Services/Taskbar
diff options
context:
space:
mode:
authorcircl <circl.lastname@gmail.com>2022-03-26 23:04:47 +0100
committerAndreas Kling <kling@serenityos.org>2022-03-27 01:11:27 +0100
commiteeeaf410fbe4735a3495f1cec05b22cc25b2a904 (patch)
tree4cbc7911d22e21af838c62121cae29f4e0158777 /Userland/Services/Taskbar
parent148f8169a4f2181e5f9a62e61dd6eedfadf99e3f (diff)
downloadserenity-eeeaf410fbe4735a3495f1cec05b22cc25b2a904.zip
WindowServer+LibGUI: Expose raw scroll wheel values to applications
This is useful, for instance, in games in which you can switch held items using the scroll wheel. In order to implement this, they previously would have to either add a hard-coded division by 4, or look up your mouse settings to adjust correctly. This commit adds an MouseEvent.wheel_raw_delta_x() and MouseEvent.wheel_raw_delta_y().
Diffstat (limited to 'Userland/Services/Taskbar')
-rw-r--r--Userland/Services/Taskbar/TaskbarWindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Services/Taskbar/TaskbarWindow.cpp b/Userland/Services/Taskbar/TaskbarWindow.cpp
index a66c72ec00..dbae8ac3c8 100644
--- a/Userland/Services/Taskbar/TaskbarWindow.cpp
+++ b/Userland/Services/Taskbar/TaskbarWindow.cpp
@@ -207,7 +207,7 @@ void TaskbarWindow::event(Core::Event& event)
if (adjusted_point != mouse_event.position()) {
GUI::ConnectionToWindowServer::the().async_set_global_cursor_position(position() + adjusted_point);
- GUI::MouseEvent adjusted_event = { (GUI::Event::Type)mouse_event.type(), adjusted_point, mouse_event.buttons(), mouse_event.button(), mouse_event.modifiers(), mouse_event.wheel_delta_x(), mouse_event.wheel_delta_y() };
+ GUI::MouseEvent adjusted_event = { (GUI::Event::Type)mouse_event.type(), adjusted_point, mouse_event.buttons(), mouse_event.button(), mouse_event.modifiers(), mouse_event.wheel_delta_x(), mouse_event.wheel_delta_y(), mouse_event.wheel_raw_delta_x(), mouse_event.wheel_raw_delta_y() };
Window::event(adjusted_event);
return;
}