-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
CloseCurrentPopup() closes all stacked modal Popups when left mouse button is clicked on non-widget space #2880
Comments
I looked into it and the problem is that Trying to think of a fix. |
…clicking on its empty space would attempt to focus it and close other popups. (#2880)
I explored various way and found a suitable fix for it, now pushed. |
…31fe97. (ocornut#3344, ocornut#2880) This would be problematic e.g. in situation where the application relies on io.WantCaptureKeyboard flag being cleared accordingly.
Version/Branch of Dear ImGui:
Version: 1.73
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_win32.cpp + imgui_impl_dx11.cpp
Compiler: MSVC15
Operating System: Windows 10
My Issue/Question:
I realize what I'm doing might be considered too specialized and there's a workaround, but I still found the behavior odd.
My goal is to have a modal popup, which was opened from another modal popup, take any keyboard/mouse input, then close it. For input binding purposes.
This works fine unless the left mouse click is used on the popup window itself and no widget takes the input. In that case, all popups are closed.
A workaround is to delay closing to the next frame, so it's not a huge deal. Still thought I should perhaps report it anyways. I'm also somewhat new to Dear ImGui, so I hope I didn't miss something obvious here.
Standalone, minimal, complete and verifiable example: (see #2261)
The text was updated successfully, but these errors were encountered: