-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Dock/undock window only with window's tab item #6709
Comments
By default if you hold Shift it disables docking, and there’s a Config option in the IO structure to swap that behavior and require Shift to Dock. Maybe that would solve your problem. |
Yea this works but it not actually what i need. I need when i click on title bar button behave as docking enabling, but rest of title bar should behave as just moving. But as i can see when window is docked to something, it displayed with title bar button, but if window is float point (not-docking) is displayed just text, but when window is float point, but contains 2+ windows it also add this title bar button (to allow opportunity to undock). I.e not always window has this title bar button. It not big of a issue but when i need just move window, it show this docking preview thing and in some places i cannot move window because it dock it with another when i dont need to. Docking with Shift is pretty good idea, but for game engine when user launch it, it doesn't know that need press Shift to dock windows, and became pretty conflicted. So maybe solution can be just check is mouse hovered title bar area and hover title bar text and then enable docking? |
Well unless there is a strong case for it, we cannot be maintaining too many variety of behaviors. It's lots of work, create bugs, and make applications less consistent.
There's a
What you are calling "title bar button" is called a "Tab" by the way.
You can press SHIFT to disable this.
I think when this option is enabled we could consider adding a tooltip to provide this information.
You cannot disable docking it will undock all windows from each others. |
By the way you can also move floating windows by clicking anywhere in empty space and this way they won't dock (unless you activated |
I tentatively pushed a change to display an affordance tooltip when Please let me know if that's helpful. |
I'm sorry for the long absence, I forgot about this question completely. In general, I came to the decision to use
Yea, i tried that, but in that case (how you said) no collapsing auto resize, etc. And some problems with moving windows right after undock (it just stops move and need to click again to continue moving). So thats not the option.
I check that, its pretty usefull. But im still on 1.88 (because to migrate i need to make sure that im not broke any ImGui features and also not broke engine specific features for ImGui), when migrate to latest 1.90.1 maybe revisit this issue. But in the meantime |
I will leave this question open for now as we can always improve it. |
That's good enough for it. Note that 1.90.0 changed undocking behavior so you cannot undock by clicking on the empty space of a dock node tab bar, so this also sort of invalidate your request, since there's only 1 type of undocking click zone (the tab) for single window and 1 type of undocking click zone (the collapse/window menu button) for whole node. Please try to upgrade more frequently. 1.88 is 18 months old and I'm only supporting backward compatibility symbols for 24 months, so recommended update frequency is <12 months. I will keep doing everything I can to make updates easier. |
Version: 1.88 WIP
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: Win32/GLFW + GL3/GL4, Win32 + DX11/DX10 (here it really doesn't matter its ImGui Core issue)
Compiler: vs2022 msvc
Operating System: windows 10
My Issue/Question:
As the picture below, I would like to know if it is possible in ImGui to somehow dock windows ONLY when the window button is clicked + move (where is its name), and on the rest of the tab bar just move it without showing that it can be docked?
Because for my project is not inconvenient, when I just want to move a free window and ImGui constantly suggests that I can move it to the nodes on the window. But if wanna really dock it, i just need to move window by pressing on it title bar.
PS: I've try search ImGuiDockingFlags but nothing i can find. I just don't wanna modifiy ImGui code itself, because i need update ImGui to 1.89.7 / 1.90 when is come out.
The text was updated successfully, but these errors were encountered: