-
Notifications
You must be signed in to change notification settings - Fork 937
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
Web: Pointer Cleanup #2847
Web: Pointer Cleanup #2847
Conversation
967abbb
to
003d904
Compare
0c60501
to
c929d3c
Compare
edae3e1
to
5ec16a8
Compare
5ec16a8
to
ece6962
Compare
yeah, the events are usually send as soon as possible on other backends.
Do they simply attached to the touch events as well on the web? Usually touch input is done without any sort of keyboard input at the same time, because, you know, you use your hands... Though, maybe I don't understand something and a concept of Not sure what other input you've requested on irc. |
Yeah, they simply attach, it has nothing to do with the actual touch input. We just use it to figure out what modifiers are active after we regain focus. This works because
No that's it, no more open questions, thank you very much 👍! |
Apologies ... I meant to squash this actually. |
@daxpedda removing MouseHandler is a huge downgrade for game developers. Currently it's the only decent option for games. PointerHandler doesn't allow pressing both left and right at the same time (or any other press including the wheel), and if they do, the previous release events don't trigger anymore (only the last button press will) |
I think that might be a bug in the winit PointerHandler implementation itself? because i remember running a demo of javascript pointer and it worked as intended. |
Indeed, the initial implementation didn't handle chorded buttons. This was addressed in #2838. Let us know if you encounter any issues! |
@daxpedda Wow i am excited to see it being worked on. let me know what i can do to help. |
That's strange, I just tried it, works perfectly on Firefox, Chrome and Safari. Did you make sure you are at the tip with |
@daxpedda you are right! It works fine with Firefox and safari. The Issue is only in: Chome (Mac) Version 114.0.5735.106 (Official Build) (arm64) I am also having a new issue now on firefox (Mac) that mousemove seems to be buggy (my character looks at the ground very fast, and can't be changed, perhaps very high positive numbers in delta.Y), should i create a separate issue for each? |
@daxpedda The 2 issues happen on Windows too. Chrome can't do chorded mouse buttons, firefox has a bug in DeviceEvent::MouseMotion perhaps it could be because of pointerlock? Update: Yes! chrome bug is due to calling request_pointer_lock(). Firefox bug is not related. forgot to reply:
|
Currently on Firefox delta reports are buggy, see the Bugzilla bug report, I fixed it in #2871. Chrome fails with chorded buttons when the pointer is locked. So I will have to investigate that. But that's all I found, if there is anything else it would be really useful to provide a step-by-step instruction on how you reproduce the issue and on what browser and OS. |
So apparently Chrome has some bugs with
I think I will rip it out completely until these issues are fixed, otherwise it's kind of unusable. |
@daxpedda yea that was it! it works perfectly now. Thank you so much, i was dealing with this for about a year. firefox deltas still seems buggy, as of the current master branch |
This is fixed in #2871, but I will actually split off the fix. |
great! awesome, thank you for your great work! |
Changes
WindowEvent::CursorMoved
before pressing or releasing a mouse button.pointerrawupdate
event, to allow getting pointer updates as fast as possible.Questions (obsolete)
All questions were already answered, just leaving it here for reference.
Contextmenu
I found that opening context menus can't be completely prevented on Firefox, because they provide a way to bypass any prevention method: Shift+Rightclick. I feel like Winit could document this somewhere, like at
WindowBuilder::with_prevent_default()
.WDYT?
Some notes on this:
contextmenu
event definition missing bypass w3c/uievents#336.Touch
The Web standard fires
focus/blur
as soon as touch starts and ends, but on Web we currently ignore this and you never get anyWindowEvent::CursorEntered/Left
on touch. How do other backends handle this?High Frequency Pointer Input
I added support for
pointerrawupdate
, which is basically the same aspointermove
but sends an event as soon as it arrives, instead of coalescing multiple events into one. I believe this aligns more with how other backends work. Does that sound alright?