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

Don't move window when dragging a split. #29

Merged
merged 1 commit into from
Oct 20, 2017

Conversation

tom-seddon
Copy link

Don't move window when dragging a split. You can see this bug in the main.html HTML demo: click the ImGui Dock button, then drag the horizontal splitter vertically in the resulting window. I couldn't get the demo code building in Windows, but this fix did fix it in my test code...

(Because the splitter ends up behind everything else, the hovered ID needs to be updated manually. The splitter's invisible button's call to ImGui::ItemHoverable ends up bailing out early from the g.HoveredWindow != g.CurrentWindow check, so the hovered ID is never updated there. If there's no hovered ID by the time of ImGui::EndFrame, there appears to be no widget under the cursor, and dragging the mouse may then move the window.)

@Flix01 Flix01 merged commit 2ddcf3c into Flix01:2015-10-Addons Oct 20, 2017
@Flix01 Flix01 mentioned this pull request Oct 20, 2017
@Flix01
Copy link
Owner

Flix01 commented Oct 20, 2017

Thanks a bunch 👍

I wonder why I didn't spot this BIG issue before...

I've just tested the fix and it seems to work (will update main.html soon: updated).

As far as the Windows build is concerned, I'd like to make it work out of the box, but I'm on Linux, so without any feedback, I can't do much...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants