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

Win+Dx9 and Multi-Viewport, sticky mouse when dragging IMGUI window from the application window. #8306

Open
mrivers-1973 opened this issue Jan 10, 2025 · 1 comment

Comments

@mrivers-1973
Copy link

Version/Branch of Dear ImGui:

Version 1.96, Branch: docking

Back-ends:

imgui_impl_W32.cpp + imgui_impl_Dx9.cpp

Compiler, OS:

Windows 11, VS2022 (but has happened across multiple versions)

Full config/build information:

Dear ImGui 1.91.7 WIP (19164)
--------------------------------
sizeof(size_t): 8, sizeof(ImDrawIdx): 2, sizeof(ImDrawVert): 20
define: __cplusplus=199711
define: _WIN32
define: _WIN64
define: _MSC_VER=1942
define: _MSVC_LANG=201402
define: IMGUI_HAS_VIEWPORT
define: IMGUI_HAS_DOCK
--------------------------------
io.BackendPlatformName: imgui_impl_win32
io.BackendRendererName: imgui_impl_dx9
io.ConfigFlags: 0x000004A0
 NoMouseCursorChange
 DockingEnable
 ViewportsEnable
io.ConfigViewportsNoDecoration
io.ConfigNavCaptureKeyboard
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,128
io.DisplaySize: 1367.00,826.00
io.DisplayFramebufferScale: 1.00,1.00
--------------------------------
style.WindowPadding: 8.00,8.00
style.WindowBorderSize: 2.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:

I've enabled multi-viewport following the instructions in the wiki (and also https://greich.com/2019/03/02/imgui-multiple-viewports/ ).

The problem occurs when dragging an imgui window from completely inside the application window to outside of the application window. The new imgui window is created and drawn but the window becomes stuck to the mouse pointer and doesn't respond to mouse button clicks(but it must be handling mouse move because of the sticky bit?)

In my WndProc, I get the message indicating the mouse left the window, but no further messages until the pointer returns to the app window area).

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

// Here's some code anyone can copy and paste to reproduce your issue
ImGui::Begin("Example Bug");
MoreCodeToExplainMyIssue();
ImGui::End();
@PathogenDavid
Copy link
Contributor

Are you able to reproduce this with the official example? (IE: example_win32_directx9)

This sounds to me like you aren't properly propagating events to the backend.

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

No branches or pull requests

2 participants