Skip to content

SDL3 viewport move/resize issues. #8591

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

Open
lailoken opened this issue Apr 24, 2025 · 0 comments
Open

SDL3 viewport move/resize issues. #8591

lailoken opened this issue Apr 24, 2025 · 0 comments

Comments

@lailoken
Copy link

Version/Branch of Dear ImGui:

1.92.0 WIP (19193) (docking)

Back-ends:

imgui_impl_sdl3 + imgui_impl_opengl3

Compiler, OS:

GCC, Linux X11

Full config/build information:

Dear ImGui 1.92.0 WIP (19193)
--------------------------------
sizeof(size_t): 8, sizeof(ImDrawIdx): 2, sizeof(ImDrawVert): 20
define: __cplusplus=201103
define: __linux__
define: __GNUC__=13
define: IMGUI_HAS_VIEWPORT
define: IMGUI_HAS_DOCK
--------------------------------
io.BackendPlatformName: imgui_impl_sdl3
io.BackendRendererName: imgui_impl_opengl3
io.ConfigFlags: 0x00000483
 NavEnableKeyboard
 NavEnableGamepad
 DockingEnable
 ViewportsEnable
io.ConfigNavCaptureKeyboard
io.ConfigInputTextCursorBlink
io.ConfigWindowsResizeFromEdges
io.ConfigWindowsMoveFromTitleBarOnly
io.ConfigMemoryCompactTimer = 60.0
io.BackendFlags: 0x0000140E
 HasMouseCursors
 HasSetMousePos
 PlatformHasViewports
 RendererHasVtxOffset
 RendererHasViewports
--------------------------------
io.Fonts: 1 fonts, Flags: 0x00000000, TexSize: 512,64
io.DisplaySize: 1280.00,720.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:

Note, these issues are not present on the SDL2 backend and works reliably there.
This has been tested using the SDL3 samples.

  1. ConfigWindowsResizeFromEdges=true and/or ConfigWindowsMoveFromTitleBarOnly=false sometimes stops resizing/moving when the mouse is moved quickly (is outside the window bounds in a single frame?), resizing is particularly troublesome (taskbar / window decorations works fine).

  2. ConfigWindowsMoveFromTitleBarOnly=false which allows dragging windows anywhere on the content does not seem to work correctly when the OS window manager already has similar functionality, like with Xfce4 where you can alt-drag any window with left button (and easy alt-drag resize with right button). When I do alt-dragging my window moves the correct amount, but them all widgets are offset by an addition amount (the same amount I dragged), leaving me to conclude it is done doubly.

For 2), This works fine on SDL2 whether the OS alt-drag is on or not, just SDL3 seems to be wrong.

Screenshots/Video:

In this sample, I had just dragged this viewport up by about a line using the window manager's alt-drag functionality:

Image

Minimal, Complete and Verifiable Example code:

Using defaulty SDL3 sample.

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