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

The mouse position in the non-client area cannot be refreshed after closing the Modal window. #7385

Closed
o-3-o opened this issue Mar 10, 2024 · 5 comments

Comments

@o-3-o
Copy link

o-3-o commented Mar 10, 2024

Version/Branch of Dear ImGui:

Version 1.90.5, Branch: docking (master/docking/etc.)

Back-ends:

imgui_impl_DX11.cpp + imgui_impl_Win32.cpp

Compiler, OS:

Win11 + MSVC2022

Full config/build information:

Dear ImGui 1.90.5 WIP (19044)
--------------------------------
sizeof(size_t): 8, sizeof(ImDrawIdx): 2, sizeof(ImDrawVert): 20
define: __cplusplus=199711
define: _WIN32
define: _WIN64
define: _MSC_VER=1939
define: _MSVC_LANG=201402
define: IMGUI_HAS_VIEWPORT
define: IMGUI_HAS_DOCK
--------------------------------
io.BackendPlatformName: imgui_impl_win32
io.BackendRendererName: imgui_impl_dx11
io.ConfigFlags: 0x00000443
 NavEnableKeyboard
 NavEnableGamepad
 DockingEnable
 ViewportsEnable
io.ConfigViewportsNoDecoration
io.ConfigInputTextCursorBlink
io.ConfigWindowsResizeFromEdges
io.ConfigMemoryCompactTimer = 60.0
io.BackendFlags: 0x00001C0E
 HasMouseCursors
 HasSetMousePos
 PlatformHasViewports
 HasMouseHoveredViewport
 RendererHasVtxOffset
 RendererHasViewports
--------------------------------
io.Fonts: 1 fonts, Flags: 0x00000000, TexSize: 512,64
io.DisplaySize: 1264.00,761.00
io.DisplayFramebufferScale: 1.00,1.00
--------------------------------
style.WindowPadding: 8.00,8.00
style.WindowBorderSize: 1.00
style.FramePadding: 4.00,3.00
style.FrameRounding: 0.00
style.FrameBorderSize: 0.00
style.ItemSpacing: 8.00,4.00
style.ItemInnerSpacing: 4.00,4.00

Details:

My Issue/Question:

When using multi-view to separate from the main window, if a Modal window pops up and then click to close the Modal window, if the mouse has not entered the main window during the closing process, ImGui will not update the mouse position event in the non-client area of the mouse unless the mouse is Enter the main window again!

Screenshots/Video:

play

Minimal, Complete and Verifiable Example code:

min examples:

https://github.com/ocornut/imgui/blob/docking/examples/example_win32_directx11/main.cpp

@o-3-o
Copy link
Author

o-3-o commented Mar 12, 2024

After testing, not only the Modal window will be like this, but all pop-up sub-windows will be like this.

The solution is to send a WM_NCMOUSEMOVE message to the main window after ImGui_ImplWin32_DestroyWindow

@o-3-o o-3-o closed this as completed Mar 13, 2024
@ocornut ocornut reopened this Mar 13, 2024
@ocornut
Copy link
Owner

ocornut commented Mar 13, 2024

Hello, thanks for reporting. Why closing the issue?

@o-3-o
Copy link
Author

o-3-o commented Mar 20, 2024

Hello, thanks for reporting. Why closing the issue?

Sorry, I see you haven't responded, so I don't think it's a mistake.

@o-3-o
Copy link
Author

o-3-o commented Sep 28, 2024

This problem has been fixed in v1.91.2

@o-3-o o-3-o closed this as completed Sep 28, 2024
@ocornut
Copy link
Owner

ocornut commented Sep 28, 2024

I think it was the same as #7971

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