Skip to content
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

"Hold SHIFT to enable Docking window" tooltip inherits NextWindowData #7491

Closed
cfillion opened this issue Apr 13, 2024 · 1 comment
Closed

Comments

@cfillion
Copy link
Contributor

cfillion commented Apr 13, 2024

Version/Branch of Dear ImGui:

1.89.9-docking – 1.90.5-docking

Details:

Since 300464a, Begin shows a tooltip when io.ConfigDockingWithShift is enabled and the left mouse button is down without moving for >1s.

However it does so before clearing NextWindowData, which causes the tooltip to inherit any SetNextWindowSize or SetNextWindowSizeConstraints and display with an inappropriate size.

Even if it was correctly sized, it is quite surprising to have a tooltip show up in the middle of the window that wasn't intended by the application/tool/script developer: https://i.imgur.com/hGw49go.gif.

Screenshots/Video:

Screen capture

Minimal, Complete and Verifiable Example code:

ImGui::GetIO().ConfigDockingWithShift = true;

ImGui::SetNextWindowSize(ImVec2(256, 256));
// ImGui::SetNextWindowSizeConstraints(ImVec2(884, 626), ImVec2(2652, 626));
ImGui::Begin("My window");
ImGui::End();
cfillion added a commit to cfillion/imgui that referenced this issue Apr 13, 2024
…stationary while moving a window displays an help tooltip to increase affordance."

Effectively reverts commit 300464a.

It would show a huge and undesirable tooltip when ConfigVar_DockingWithShift is enabled + SetNextWindowSize{,Constraints} + Begin.

https://i.imgur.com/hGw49go.gif

ocornut#7491
cfillion added a commit to cfillion/reaimgui that referenced this issue Apr 13, 2024
…oltip

The issue would occur when ConfigVar_DockingWithShift is enabled + SetNextWindowSize{,Constraints} + Begin.

https://i.imgur.com/hGw49go.gif

ocornut/imgui#7491
ocornut added a commit that referenced this issue Apr 15, 2024
@ocornut
Copy link
Owner

ocornut commented Apr 15, 2024

Thank you for your report. This should now be fixed with c1743ee

@ocornut ocornut closed this as completed Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants