mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
[PR #192] [MERGED] CtrlCore: Horizontal mouse wheel support using MouseWheelHor() #220
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/ultimatepp#220
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ultimatepp/ultimatepp/pull/192
Author: @User0755
Created: 2/13/2024
Status: ✅ Merged
Merged: 2/14/2024
Merged by: @mirek-fidler
Base:
master← Head:mousewheel3📝 Commits (1)
710a991CtrlCore: Horizontal mouse wheel support using MouseWheelHor()📊 Changes
4 files changed (+44 additions, -14 deletions)
View changed files
📝
uppsrc/CtrlCore/CtrlCore.h(+2 -0)📝
uppsrc/CtrlCore/CtrlMouse.cpp(+20 -4)📝
uppsrc/CtrlCore/GtkEvent.cpp(+20 -9)📝
uppsrc/CtrlCore/Win32Proc.cpp(+2 -1)📄 Description
This solution (branch mousewheel3) uses a separate mouse event (MOUSEHWHEEL) for propagating horizontal mouse wheel events. This is quite straight forward and avoids major changes in CtrlCore. Also, this will not cause compatibility issues for existing code. The Ctrls will receive the event as a call to MouseWheelHor(). K_SHIFT is not manipulated.
--
I have also created another branch (mousewheel2) that attempts to pass the mouse wheel in a Point structure. However, this path proved to behave like a snowball rolling down the hill causing a lot of changes all around. In the end, I was not able to make the call to MouseWheel() with Point delta while still supporting current MouseWheel() with int. The reason was that the default Ctrl::MouseWheel() had to exist for propagating unprocessed calls for other Ctrls. So, MouseWheel() with Point delta is not compatible with existing code base. It is worth noting that both Windows and GTK produce the vertical and horizontal wheel events separately, so passing them combined as a point would not yield much benefit. (This would only happen after event compression.)
Finally, the simplest solution of all (now available as branch mousewheel-K_SHIFT), is also available for evaluation on User0755/ultimatepp.
// Tom
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.