-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
SetNextWindowRefreshPolicy issues #7797
Comments
Thanks for reporting. I have pushed a fix for the first issue. |
I have also pushed a fix for the second use case: 6864a7f However, that popup case may be generalized further, even without popup: ImGui::SetNextWindowRefreshPolicy(ImGuiWindowRefreshFlags_RefreshOnFocus | ImGuiWindowRefreshFlags_RefreshOnHover | ImGuiWindowRefreshFlags_TryToAvoidRefresh);
if (ImGui::Begin("Window A"))
{
ImGui::Text("%d", ImGui::GetFrameCount());
ImGui::SetNextWindowRefreshPolicy(ImGuiWindowRefreshFlags_RefreshOnFocus |
ImGuiWindowRefreshFlags_RefreshOnHover | ImGuiWindowRefreshFlags_TryToAvoidRefresh);
if (ImGui::Begin("Window B"))
{
ImGui::Text("%d", ImGui::GetFrameCount());
}
ImGui::End();
}
ImGui::End(); And this gets more tricky because whereas in the popup case, the nested popup can't exist when parent is focused, here they are two distinct windows. We would need to store an array of windows submitted within our begin stack next to |
At the very least case with Begin, unlike BeginChild/popup, could be solved by user by moving Begin call outside and manually controlling Window B visibility. Still a booby trap, but a booby trap that can be worked around. |
Version/Branch of Dear ImGui:
Version 1.90.9, Branch: master
Back-ends:
Win32 + DirectX 9
Compiler, OS:
MSVC 2019
Full config/build information:
No response
Details:
Please note that I realize this is experimental stuff and I don't have an active need in this functionality. I just happen to play around it and thought to share some feedback. So deal with it at your pace, perhaps you are already aware of these limitations.
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response
The text was updated successfully, but these errors were encountered: