Skip to content

Multi-viewport: Dragging window from ImGuiTitleBar while maximized causes glitchy behavior #9368

@OriolCS2

Description

@OriolCS2

Version/Branch of Dear ImGui:

1.92.6 WIP Docking

Back-ends:

imgui_impl_sdl3.cpp + imgui_impl_opengl3.cpp

Compiler, OS:

Windows 10 MSVC 2022

Details:

My Issue/Question:

When Viewports are enabled with OS Decorations, a bug occurs when dragging a single window that is currently maximized.

If you drag the window from the ImGui Title Bar, ImGui seems to lose the correct mouse coordinate reference, resulting in a significant offset and it is quite impossible to interact with anything.
Also resizing the window with the ImGui window resize bars, ends up with a rendering glitch.

The following video shows how I dragg the window from the ImGui Title Bar and then the mouse input position stop working. Also after this, I show the rendering glitch.

Bug.mp4

I've somehow fixed it restoring the window when ImGui wants to move its position at imgui_impl_sdl3.cpp like so:

Image

As shown in the attached video, during the "restore" transition, the window momentarily appears at its pre-maximized coordinates for a few frames before snapping to the cursor. While this doesn't block functionality, it creates a jarring visual pop. I know this is not the final solution, but this doesn't block anything.

Workaround.mp4

Hope it helps!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions