-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
The imgui window can't be moved outside the desktop region #3899
Comments
I assume that you are using the x11 implementation of SDL. Dear ImGui uses the set window position function of SDL to relocate the window. Unfortunately SDL as well as GLFW only communicate with xserver and not with the window manager. Therefore they are unable to move any window border beyond the screen border for some WMs. The main window uses the decoration to be relocated, which is handled by the WM, that has full control over the window position. I do not have any experience with the wayland implementation. |
yes, I'm on nvidia gpu, and can only use xwindows with ubuntu. so which backend would support this function? I'm interested in using imgui to build conventional desktop applications. |
when a panel is detached from the main window, are we creating a new window for it? I have seen other opensource projects trying to replicate the detachable tabs of the chrome browser, they would create another empty window, similar to the main window, and draw the detached ui there. It seems that imgui's detachable ui is frameless and created differently. |
I found this https://lazyfoo.net/tutorials/SDL/36_multiple_windows/index.php not sure if useful |
The undocked window is a separate window as well. The only difference is the missing decoration. As far as i know the Windows version of GLFW is working as intended. In principle you could alter the window creation in Dear ImGui which need to call the SDL create window function to reenable the window decoration, but i assume that this would break some invariants in Dear ImGui. |
As i mentioned in another issue, this is a known bug which we reported to SDL and GLFW and are waiting for fixes. |
…een bounds while WM forces window to remain within screen bounds. (ocornut#3898, ocornut#3899) Only helps GLFW, because glfwGetWindowPos() correctly returns actual window position. SDL_GetWindowPosition() on the other hand returns window position before WM restricting window movement, which does not match actual window position on screen.
Working on better handling this situation. Proof of concept patch linked above ☝🏻. It only works for GLFW as it properly reports window position when window is stuck at the edge of the screen. A PR submitted to SDL fixing a bug which will make |
…een bounds while WM forces window to remain within screen bounds. (ocornut#3898, ocornut#3899)
Does it supported put Imgui window outside of glfw window now? |
This still seems not to be fixed on X11 & GLFW. For a quick hack you can fork GLFW repo,
Not a solution I would create PR out of but it seems to work on X11 while we wait for the actual GLFW fix. |
Version/Branch of Dear ImGui:
f1bf642
Version: 1.82 WIP
Branch: docking
Back-end/Renderer/Compiler/OS
Tried both opengl3 and vulkan/ sdl,
gcc-8
ubuntu 18.04 on nvidia / xwindows
Back-ends: imgui_impl_sdl.cpp, vulkan / opengl3
Compiler: gcc-8
Operating System: ubuntu 18.04
My Issue/Question:
I'm testing the docking branch with the official examples. I have tried both the vulkan backend and the opengl3 backend. I have noticed some issues.
One problem is that once an imgui window is detached from the main window, it can't be moved outside the screen region.
This is inconvenient , because the window is very large and always occupies the desktop. Making it difficult to see what's behind. For certain use cases, I need to cross reference multiple application windows.
Screenshots/Video
Standalone, minimal, complete and verifiable example:
this is the same official demo, but it has a CMake file
testimgui.zip
The text was updated successfully, but these errors were encountered: