-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
WantCaptureMouse and popups #4480
Comments
This is an interesting question.
So I think this would mostly work:
PS: Would be good to hear your confirmation as to whether this works perfectly or not! |
Technically speaking we could strive to replace the imgui_internal |
Thank you. This is the approach I was taking, but I feel it's not complete. |
I don't understand your example. If you are dragging a DragFloat but hovering a popup, |
Sorry. Dragging a DragFloat, there is a popup open, but the mouse is not hovering on any window. In my understanding, the mouse should be captured. Using your suggestion, it is not. Am I right? |
Right, should also be testing for |
Thank you. This should solve my use case. But what about drag and drop? What about WantCaptureMouseNextFrame? Since it's getting complicated, shouldn't it be the case to just provide a separate WantCaptureMouse* for this? |
Try testing for I'm not sure what you mean or want with "WantCaptureMouseNextFrame".
Not until you've used the current solution extensively and can confirm it catches all cases.
|
As for catching all use cases, the current value is:
This should already catch all, excluding unknown bugs.
I couln't find a good name for it. |
That's a good point, and it is a good idea to do this this way. Thank you! |
This doesn't seem to work unfortunately: because on the initial click
Which leads to us thinking we owned the initial click:
Which leads to an incorrect report while that button is held.
Fixing this requires us tracking a second set of |
Thank you very much! |
Version/Branch of Dear ImGui:
Version: 1.81
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: custom backend written in Go (based on glfw+opengl3 backend)
Compiler: Go + GCC
Operating System: Windows
My Issue/Question:
From my understanding of source code,
WantCaptureMouse
always returns true when non-modal popups are open. I think this is because a click outside the popup should close the popup. In my application I use center and right mouse button to move the view and I'd like to be able doing so with a popup open, but do not find a way to do so.I'd like to do something like:
But I don't find a way. Could you help me? Thank you.
The text was updated successfully, but these errors were encountered: