-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Make full-viewport imgui window move host platform window (was: borderless imgui window) #8268
Comments
There's currently no straightforward way to accomplish this. Proper support is covered by #3680 and #3350 ImHex appears to do what you're wanting. I've never dug into how they're doing it, but it might be worth looking into.
This is basically how things work when multi-viewports are in use. |
Yes, this feature is still necessary for developing applications with ImGui. I don't know if this is in the plan. I have also been trying to deal with this problem, but it is not ideal because I also want to adapt to APIs such as ImGui::SetNextWindowSizeConstraints. |
It’s a frequently requested feature to be able to start a window drag from any desired location, so I will eventually work on it. It may be implemented in two ways: emulating move (the same way we currently do when dragging eg a viewport, or forwarding to the OS move which is more involved but has a few advantages. |
ImHex does very platform-dependent things to handle this correctly. Instead of having ImGui inherit the window in some way, we do one of the following:
|
Version/Branch of Dear ImGui:
both latest master and latest docking
Back-ends:
imgui_impl_sdl2.cpp + imgui_impl_sdlrenderer2.cpp
Compiler, OS:
windows 11 + msys clang
Full config/build information:
Details:
My Issue/Question:
is it possible to make the imgui inherit the platform window? e.g. i create a sdl borderless window and i would like to have a single imgui window to draw its own titlebar, handle resize/movement of the underlying platform window
i can achieve this (but with tearing and other issues):
i think the tearing comes from using
ImGui::SetWindowPos({0, 0});
which updates the position in the next frame, not immediatelly, but usingImGui::SetNextWindowPos
would throw away the information about the window repositioning.otherwise i would have to implement the window repositioning manually via sdl event handling.
docking branch supports this on some renderer backends (not sdlrender2), but i cant figure out how to have main window to be the imgui window
Screenshots/Video:
2024-12-29.00-41-42.mp4
Minimal, Complete and Verifiable Example code:
The text was updated successfully, but these errors were encountered: