-
Notifications
You must be signed in to change notification settings - Fork 941
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
Handle WM_POINTER* events in favor of WM_TOUCH #975
Comments
As a side note, I read your call for help and even though i'm totally new to open source contribution, I would gladly help when- and where-ever i can. I have a full-time job as C++/Windows desktop application developer, so i have some experience with WinAPI, and would gladly learn and help with X11 stuff. |
Hi, and thanks for bringing this up/volunteering! Sorry about the delay in a response. I can't see any much in the way of downsides in adding this. I don't have easy access to a Windows touchscreen device, so would you be able to implement this? I'd give mentoring instructions, but given the nature of this bug report you seem to have a good handle on how to go about making this change. |
No problem about the delay. I created a PR for this issue. During testing I noticed that touch events' location are screen coordinates, not client coordinates like mouse events. This is the default behavior on Windows, but is this the desired behavior for winit too? |
Thanks! And, we should translate into client area coordinates. That'll be more consistent with the rest of the API, and expressing the event in screen coordinates isn't actually possible on all backends (Wayland being the main exception I'm aware of). |
Sorry for the late answer! I've created a new issue for touch events emitting screen coordinates. |
commit 026b331 Author: Kalmár Róbert <[email protected]> Date: Fri Jul 5 18:37:25 2019 +0200 Handle WM_POINTER* events in favor of WM_TOUCH Fixes rust-windowing#975 commit 93c36cc Author: Kalmar Robert <[email protected]> Date: Thu Jun 27 11:34:38 2019 +0200 Handle WM_POINTER* events in favor of WM_TOUCH Fixes rust-windowing#975.
As WM_TOUCH have some well document problems, I think it would be more appropriate to handle the WM_POINTERDOWN, WM_POINTERUPDATE and WM_POINTERUP event family whenever possible. Even though these events are only sent by Windows 8.1 or higher, they are more robust, easier to set up (no need to call Un-/RegisterTouchWindow) and less error prone.
The text was updated successfully, but these errors were encountered: