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

Last closed window still sends events after being dropped #3926

Open
skyrina opened this issue Sep 21, 2024 · 0 comments
Open

Last closed window still sends events after being dropped #3926

skyrina opened this issue Sep 21, 2024 · 0 comments
Labels
B - bug Dang, that shouldn't have happened DS - x11

Comments

@skyrina
Copy link

skyrina commented Sep 21, 2024

Description

I have a program that manages windows using a HashMap<WindowId, Window>. After removing a window from the hashmap, and even manually calling drop() on it, it still continues to receive events (although the "destroyed" event is expected).

In the log below, I created two windows, closed one, clicked on my desktop, then closed the second window and clicked again. Each click resulted in two ModifiersChanged events for the last closed window, one for holding the click down and another for releasing it, despite the window being dropped:

received event RedrawRequested from nonexistent window WindowId(67108874)
received event Destroyed from inexistent window WindowId(67108874)
received event ModifiersChanged(Modifiers { state: ModifiersState(0x0), pressed_mods: ModifiersKeys(0x0) }) from inexistent window WindowId(67108874)
received event ModifiersChanged(Modifiers { state: ModifiersState(0x0), pressed_mods: ModifiersKeys(0x0) }) from inexistent window WindowId(67108874)
received event RedrawRequested from nonexistent window WindowId(67108867)
received event Destroyed from inexistent window WindowId(67108867)
received event ModifiersChanged(Modifiers { state: ModifiersState(0x0), pressed_mods: ModifiersKeys(0x0) }) from inexistent window WindowId(67108867)
received event ModifiersChanged(Modifiers { state: ModifiersState(0x0), pressed_mods: ModifiersKeys(0x0) }) from inexistent window WindowId(67108867)

OS and window mananger

Linux 6.6.51
Xwayland

Winit version

0.30.5

@skyrina skyrina added B - bug Dang, that shouldn't have happened DS - x11 labels Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B - bug Dang, that shouldn't have happened DS - x11
Development

No branches or pull requests

1 participant