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

Undocking an entire docked window #2645

Closed
Folling opened this issue Jul 1, 2019 · 4 comments
Closed

Undocking an entire docked window #2645

Folling opened this issue Jul 1, 2019 · 4 comments
Labels

Comments

@Folling
Copy link

Folling commented Jul 1, 2019

Version/Branch of Dear ImGui:

Version: 1.71
Branch: docking

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_glfw3_opengl3,cpp
Compiler: clang
Operating System: arch linux

My Issue/Question:

Is there an option to drag an entire window full of docked windows aligned in a tab area? It seemed natural to me to reorder some docked windows around.

Screenshots/Video
https://youtu.be/w3rNxujfxB0

@ocornut
Copy link
Owner

ocornut commented Jul 1, 2019

You can do that by dragging from the little Dock Menu on the left side.

We should make it possible from the remaining part of the title bar, as your video suggest, this is still in my todo list.

@ocornut ocornut added the docking label Jul 1, 2019
@ocornut
Copy link
Owner

ocornut commented Jul 17, 2019

The problem I have with this is that dear imgui allow you to have floating dockspaces, and we need a way to be able to move those.

So if you have this:

image

And clicking from the title bar of either would undock it, how do you move the whole group?
(EDIT) This is mostly a problem when using io.ConfigWindowMoveFromTitleBarOnly = true..

There's currently a little known feature where holding SHIFT while dragging a window disable the docking markers, which makes it possible to move a window anywhere without docking interference.

I could make it that the same SHIFT modifier would prevent undocking, which would allow moving the group of windows pictured above. We would however still have a discoverability problem with this feature..

(EDIT) This would also be odd when using io.ConfigDockingWithShift as the SHIFT modifier would have a slightly inconsistent meaning here... However it seems that there's too much friction with people using io.ConfigDockingWithShift.. I think it was a much better default but being non-standard puts people off.. So maybe that option is going to be removed eventually :/

@ocornut
Copy link
Owner

ocornut commented Jul 17, 2019

And clicking from the title bar of either would undock it, how do you move the whole group?
(EDIT) This is mostly a problem when using io.ConfigWindowMoveFromTitleBarOnly = true..
There's currently a little known feature where holding SHIFT while dragging a window disable the docking markers, which makes it possible to move a window anywhere without docking interference.
I could make it that the same SHIFT modifier would prevent undocking, which would allow moving the group of windows pictured above. We would however still have a discoverability problem with this feature..
(EDIT) This would also be odd when using io.ConfigDockingWithShift as the SHIFT modifier would have a slightly inconsistent meaning here... However it seems that there's too much friction with people using io.ConfigDockingWithShift.. I think it was a much better default but being non-standard puts people off.. So maybe that option is going to be removed eventually :/

Another idea is that I could invert the role and make dragging from the Collapse/WindowMenu button always move the window and that would work for an entire group, whereas dragging from the tab/title bar space would undock.

ocornut added a commit that referenced this issue Jul 17, 2019
@ocornut
Copy link
Owner

ocornut commented Jul 17, 2019

Pushed a change for that.

I currently made it that:

  • If the dock node is part of a fixed dockspace (vs part of floating hierarchy), both dragging from title bar or from the collapse button will undock the whole node. This is in line with everyone expectations. This is higher a larger threshold than the typical mouse drag threshold to avoid false positive.

  • If the dock node is part of a floating hiearchy, dragging from title bar will move the whole group, dragging from collapse button will undock the node. This is a little unusual but feels like the right thing at the moment.. might come back to it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants