Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS: Set mouse delta to move and drag event #3051

Merged

Conversation

chutneyio
Copy link
Contributor

This PR fixes the issue where pen drag to pan does not work in some apps which requires mouse delta.
Fixes #3048

Copy link
Member

@X9VoiD X9VoiD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test if this works on both absolute and relative output modes. This looks redundant to what this does:

protected override void SetPendingPosition(IntPtr mouseEvent, float x, float y)
{
CGEventSetLocation(mouseEvent, GetCursorPosition() + new CGPoint(x, y));
CGEventSetDoubleValueField(mouseEvent, CGEventField.mouseEventDeltaX, x);
CGEventSetDoubleValueField(mouseEvent, CGEventField.mouseEventDeltaY, y);
}

And will likely break relative output mode. Probably only change OpenTabletDriver.Desktop/Interop/Input/Absolute/MacOSAbsolutePointer.cs

@chutneyio
Copy link
Contributor Author

chutneyio commented Nov 26, 2023

@X9VoiD Yeah this issue only happens in absolute mode. I moved the code to MacOSAbsolutePointer.cs

@X9VoiD X9VoiD added the needs-backport PR needs to be backported to stable branch label Nov 26, 2023
@X9VoiD X9VoiD merged commit 8f0247d into OpenTabletDriver:master Nov 26, 2023
7 checks passed
@chutneyio chutneyio deleted the macos-add_mouse_delta_to_drag_event branch November 26, 2023 15:38
@gonX gonX added bug Something isn't working macos Affects the MacOS platform and removed needs-backport PR needs to be backported to stable branch labels Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macos Affects the MacOS platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support drag to pan the scene around in Godot, Unity
3 participants