-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
ImGui_ImplWin32_UpdateMousePos BugFix #2087
Comments
Could you explain/justify in greater in which situation (Linking this to #1951.) |
I am hooking into an app and when the app loads the 3d Environment GetActiveWindow fails. I am not sure whats happening but GetActiveWindow fails and GetForegroundWindow is not a good solution. I read somewhere that you do it like this because you wanna be able to drag outside of the clientarea. And that's cool and if that wasnt the case i think putting it back to being handled inside the WndProc would be the best way. But doing it like im doing it here i think is the best solution to this problem. I dont think that checking witch window the mouse is in is that good as Nukem9 does here #1951 Because if theres an overlay then that could possibly trigger on that window instead. |
thank you this was troubling me for a while |
I can confirm this issue when hooking into the Unity Editor as well as my Unity game. Your bugfix allows mouse input to get through as intended. |
@skillessgamer Today I have pushed a change to use GetForegroundWindow(), howver your last post mention:
Could you clarify why GetForegroundWindow is not a good solution? |
@ocornut GetForegroundWindow() will return the topmost window if i am not mistaken. That will be an issue if you have a overlay of some sort. My solution will get the active window from the executable ImGui runs. |
v1.66
Back-ends: ImGui_ImplWin32_UpdateMousePos
OS: win10 pro
Compiler:VS2017
I found a bug in ImGui_ImplWin32_UpdateMousePos more specific the windows function GetActiveWindow. It fails in some cases to get the window without any error codes so i re coded it using GetGUIThreadInfo instead and that managed to return the active window handle. I have no experience with github so i cant push this so i am giving the fix here.
The text was updated successfully, but these errors were encountered: