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
Events are broken when opening multiple windows #727
Comments
On which platform is this? |
Linux x86_64, under x11 |
This is probably because it's using a function that receives events for all the windows [1] instead of using something like [1] https://github.com/tomaka/glutin/blob/master/src/api/x11/window.rs#L184 |
My 2 cents: I had this issue for wayland: the events for the whole application must be retrieved in the same place. So I've set up some global logic for dispatching the events to internal event queues for each window: https://github.com/tomaka/glutin/blob/master/src/api/wayland/context.rs#L152-L188 The caveat of this regarding glutin design, is that |
This looks like a design flaw in glutin for me. Probably it was designed for single window apps (like games). But I'm trying to write a widget toolkit, and this doesn't fit my needs. Looks like i'll have to fallback to raw Xlib :c |
Closing for rust-windowing/winit#68 |
If you open and poll events for multiple windows, they are received by a random window, instead of the one where currently the event is happening. That means if I open two windows called
foo
andbar
, if I move the mouse insidefoo
, thenbar
will randomly receive mouse movement events too.Included sample code for both glium and glutin versions: https://gist.github.com/darkstalker/e1059220502a29913752
The text was updated successfully, but these errors were encountered: