Immediate-Mode-UI / Immediate-Mode-UI/Nuklear
Inputs propagating to windows in background
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11.4k
- Forks
- 686
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 3
Description
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.
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the input handling for dropdown menus, window focus, and the XY view described in the issue. Reproduce the overlapping-window click, then identify where the same click reaches both the menu item and the background window; done means selecting the menu item no longer changes the obscured window.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100