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

Unable to proprely drag a imgui window outside of glfw window on Xubuntu (Ubuntu/Linux) #3158

Closed
NicolasFirmo opened this issue Apr 24, 2020 · 3 comments

Comments

@NicolasFirmo
Copy link

Dear ImGui 1.77 WIP (17601)
--------------------------------
sizeof(size_t): 8, sizeof(ImDrawIdx): 2, sizeof(ImDrawVert): 20
define: __cplusplus=201703
define: __linux__
define: __GNUC__=7
define: IMGUI_HAS_VIEWPORT
define: IMGUI_HAS_DOCK
--------------------------------
io.BackendPlatformName: imgui_impl_glfw
io.BackendRendererName: imgui_impl_opengl3
io.ConfigFlags: 0x00000441
 NavEnableKeyboard
 DockingEnable
 ViewportsEnable
io.ConfigViewportsNoDecoration
io.ConfigInputTextCursorBlink
io.ConfigWindowsResizeFromEdges
io.ConfigWindowsMemoryCompactTimer = 60.0f
io.BackendFlags: 0x0000140E
 HasMouseCursors
 HasSetMousePos
 PlatformHasViewports
 RendererHasVtxOffset
 RendererHasViewports
--------------------------------
io.Fonts: 1 fonts, Flags: 0x00000000, TexSize: 512,64
io.DisplaySize: 640.00,480.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

Version/Branch of Dear ImGui:

Version: v1.76
Branch: docking

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler: g++ (gcc)
Operating System: Xubuntu 18.04

My Issue/Question:

I'm developing this Linux/Windows project (tested so far on Xubuntu 18.04 and Windows 10) and the following issue is only occurring on my Xubuntu:
When I try to drag a imgui window outside of my glfw window, as it reaches the border, causing the glfw window loses focus, it loses the dragging behaviour even though I'm still holding the mouse button.

Screenshots/Video

ezgif-3-1886f5c57466

Standalone, minimal, complete and verifiable example: (see #2261)

I could reproduce the issue by compiling the example_glfw_opengl3's main.cpp

@NicolasFirmo NicolasFirmo changed the title Unable to drag a imgui window outside of glfw window on Xubuntu (Ubuntu/Linux) Unable to proprely drag a imgui window outside of glfw window on Xubuntu (Ubuntu/Linux) Apr 24, 2020
@rokups
Copy link
Contributor

rokups commented Apr 24, 2020

Hello @NicolasFirmo,
This is a known issue, a bug in GLFW. You can follow it at glfw/glfw#1562
If you absolutely need it fixed you may use a dirty workaround i have: rokups@c510c11
Or you may use SDL, it does not have this problem.

@ocornut
Copy link
Owner

ocornut commented Apr 24, 2020

I'll close this as duplicate of the discussion in #2117
I hope we can somehow merge a workaround on our side soon!

@ocornut ocornut closed this as completed Apr 24, 2020
ocornut added a commit that referenced this issue Nov 5, 2024
… while dragging and creating new viewport. (#3158, #7733, #7922)

Initially suggested by rokups. Rewrote for recent backends with a few tweaks to accomodate for variable WM unfocus timing.
@ocornut
Copy link
Owner

ocornut commented Nov 5, 2024

This is now fixed by c347d69. Thanks everyone for the help, and @rokups, and sorry for taking so long to look at this workaround.

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

3 participants