Open HenryKaufman opened 2 years ago
Any ideas about this one? Is there something wrong with the way I wrote up the issue?
Is there something wrong with the way I wrote up the issue?
A large wall of code puts the burden on us to read through it all and try to discern what might be going wrong. (Or to guess and make our own minimal repro.)
(Sorry if it's not minimal enough, but I figured a complete working example would be easier to deal with.)
The idea from the minimal reproducible example is that you can give us something we can copy+paste into one of the official Dear ImGui example applications to reproduce the bug.
It also gives us some confidence you've spent the effort of trying to whittle things down to the basics as part of your own effort to debug things.
For example, your code has a bunch of stuff relating to your main menu bar boilerplate, Direct3D setup, and Font Awesome. All of which are very unlikely to be related to the problem at hand and just serve as noise.
Version/Branch of Dear ImGui: Version: 1.89 WIP (18832) Branch: docking imgui_impl_win32 imgui_impl_dx11
Back-end/Renderer/Compiler/OS Back-ends: _imgui_impl_win32.cpp + imgui_impldx11.cpp Compiler: Visual Studio 2017 Operating System: MS Windows 10 Pro
My Issue/Question:
A window (i.e. ImGui::BeginWindow) behaves nicely until it is add as a child to the main App window. When the main App window is moved (or resized), the child window moves along with it (as expected), but then it pops to the background below all the main window content in the App window and is no longer clickable. The main App window is built with a ImGui::BeginWindow / ImGui::EndWindow sequence that is set up to fill the app window. I tried using the ImGuiWindowFlags_NoBringToFrontOnFocus on the main window to keep it in the background as mentioned in another issue, but that didn't help.
Screenshots/Video
https://user-images.githubusercontent.com/6425918/199611494-4f9c3189-1c9f-4dd6-900f-a04d6d3b7eab.mp4
Standalone, minimal, complete and verifiable example: The complete example below shows the behavior in the video above. (Sorry if it's not minimal enough, but I figured a complete working example would be easier to deal with.) The larger window sticks out of the main window and is moveable. The smaller window inside the main window seems to be behind the full-window ImGui app window so it is unclickable. If you resize the main window so the small window sticks out, it becomes clickable.
If you move either window back inside the main window, they are still on top and clickable. If you just move the main app window, those smaller windows move together with it and are sometimes still clickable. But then if you resize the main window, the windows inside seem to be pushed behind the full-window ImGui app window and become un-clickable. My hope is that this wouldn't happen, or that I could explicitly control the Z-ordering of windows. I understand that is being considered from some of the other github issues I've read.
Thanks for your help!!