-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
IM_ASSERT(0 && "Code uses SetCursorPos()/SetCursorScreenPos() to extend window/parent boundaries...") #5911
Comments
This means the last action in a window is moving cursor position beyond contents boundaries and not submitting an item. I don't see such pattern in the code you pasted, and cannot repro with the code you pasted. Are you 100% sure that this exact code you pasted triggers the issue in Can you try making a minimal standalone repro that I can paste in main.cpp or imgui_demo.cpp ? |
My bad, I understand I was not setting The condition are:
The same would happen with a Begin()/End() when Collapsed. Fix is: |
Tested: works fine! Thank you a lot to you. |
…ates cursor position inside a collapsed/culled window and IMGUI_DISABLE_OBSOLETE_FUNCTIONS is enabled. (ocornut#5548, ocornut#5911)
Version/Branch of Dear ImGui:
Version: 1.89 release
Back-end/Renderer/Compiler/OS
Back-ends: GLFW + OpenGL (with GLAD loader)
Compiler: CLang 15.4 - gcc 12.2.1 - VS2019
Operating System: Linux (X11) & Windows 11
My Issue/Question:
I get
IM_ASSERT("Code uses SetCursorPos()/SetCursorScreenPos() to extend window/parent boundaries.")
, inErrorCheckUsingSetCursorPosToExtendParentBoundaries()
function, without an apparent motivation (I believe).I premise that I have read #5548
This problem seems to occur opening (initially closed) Billboard
ImGui::TreeNodeEx
(which contains some otherImGui::TreeNodeEx
), and only when the CursorPos is outside of "visible" context.In the following example the trouble happens is in the Colors
ImGui::TreeNodeEx
(with ColorMap), inside Billboard:This is the code where it happens: I removed any unnecessary part to simplify debug
If it can be of interest...
For debugging I bypassed/commented IM_ASSERT...
... and i noticed this values in
window->DC
:First time (where it would be blocked in IM_ASSERT)
Next pass
(both acquired from call
ImGui::EndChild()
, in previous code)If you need more tests, i'll be glad to do them.
Adding...
Apart from the "assertion" in Debug mode, I found no apparent problem or malfunction in Release mode.
Thank you in advance.
The text was updated successfully, but these errors were encountered: