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
Hack to make X11 work #121
Conversation
I see you're still experiencing an issue, at @csnewman also ran into it. Can you explain when and why it occurs? |
So as @csnewman suggested it looks like winit may not be generating an entered event on x11 if the window starts with the cursor already over it. The right way to fix this would be to make sure that an enter event is always generated. |
In my case, it looked like 2 entered events were being sent or X11 was handling entered events on its own, since the states.find check indicated that the device was already stored in the device map. |
also can you rebase and squash the changes?
we really need a proper fix so that we can merge it. |
I'm not sure this is the correct approach. We should check if the device is already added, and if so, don't send an additional add. |
I think the only way to properly check this is on the engine-side. Are either of you working on local engine build subcommands for cargo-flutter? |
Local engine builds? We shouldn't need to patch the actual flutter engine, the logic to prevent this error should be handled in flutter-rs (in the flutter-engine crate). As it is a bug to be sending two for sure. |
what I don't fully understand is why we are sending two entered events. is it a winit bug? but we can easily fix it on the flutter-rs side. |
Afaik it's a winit bug |
I made the Pointers index function return a bool to check whether the
device was newly added, and it doesn't help with the flutter engine check.
Is this a bug on our side or winit rs? I think what's happening is that
winit sends one event on its own then we send our event, which fails the
new device check.
Off topic: I figured being able to tinker with the engine would help
diagnose something like this, since we would be able to add printf's
internally. Is there a debugger option instead?
…On Mon, Feb 3, 2020 at 3:34 PM Chandler Newman ***@***.***> wrote:
Afaik it's a winit bug
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#121?email_source=notifications&email_token=AA6S7P4V4FK24M2LW2KNB6LRBCSZFA5CNFSM4KPALMCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKVZR4A#issuecomment-581671152>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6S7P43IJSFKST5ACM7HI3RBCSZFANCNFSM4KPALMCA>
.
|
Closing this for now |
This is a lot less invasive than my previous pull requests. Feels like a hack though. I am checking against the OS which doesn't specifically block out X11, but seeing as how flutter uses X11 for linux, we shouldn't run into any issues.