Skip to content

SDL3 discrepancy between dragging by OS title bar and by ImGui title / content. #8992

@lailoken

Description

@lailoken

Version/Branch of Dear ImGui:

1.92.2b (19222) docking

Back-ends:

SDL3 + OpenGL3

Compiler, OS:

Linux GCC

Full config/build information:

No response

Details:

In our application we are using OS Window decorations and not ImGui Title bars/decorations.
io.ConfigViewportsNoDecoration = false;

The problem happens with the sample SDL3 + OpenGL3 application: only add io.ConfigViewportsNoDecoration = false.

Steps:

  1. Drag the Demo window out of the Application into its own viewport.
  2. Drag the window by the OS title bar.
  3. It works and all the offsets in the window is still correct (mouse hover highlights correct elements.)
  4. Then drag the window by either the ImGui Title bar or open background area (if available).
    a) I notice that when you first click, the window moves by a small vertical offset (about the size of my native OS titlebar?)
    b) this offset is the same with which everything is now out of sync with the mouse afterwards (mouse hover is offset)
    c) when I drag with native OS title bar it is fixed again.

This

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

Modify the sample application to include:

    io.ConfigViewportsNoDecoration = false;

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions