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

Inputs propagating to windows in background #643

Open
sylvester-prisse opened this issue May 22, 2024 · 1 comment
Open

Inputs propagating to windows in background #643

sylvester-prisse opened this issue May 22, 2024 · 1 comment

Comments

@sylvester-prisse
Copy link

sylvester-prisse commented May 22, 2024

I am writing a level editor with a menu bar window at the top containing dropdown menus. When opening such a dropdown menu and clicking on an item that overlaps another window behind the dropdown menu, the click event propagates through to that window. Is there any way to prevent this from happening? Do I have to manually keep track of when a dropdown menu is opened and disable all inputs to other windows while this is the case?

For example in this screenshot I am hovering the "Find" item in the "Edit" menu and when I then click it, that click is also registered with the XY view below and in this case would deselect the currently selected object.

editor_dropdown_menu

I tried only processing inputs when the window has focus, but this doesn't help because the focus is immediately transferred to the background window when clicking.

@sylvester-prisse sylvester-prisse changed the title Inputs propagating to background windows Inputs propagating to windows in background May 22, 2024
@bolt-blue
Copy link

This has also been mentioned at least here (#250).

I've hit the same (or similar) issue myself - a button press in one window also affecting a window underneath. Not yet sure of a decent solution.

Looks like this fix (#14) might cover similar ground (but for buttons) but I haven't read through the code changes there to see if there might be anything related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants