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

ability to combine multiple windows into one #1122

Open
Delta456 opened this issue Dec 18, 2023 · 6 comments
Open

ability to combine multiple windows into one #1122

Delta456 opened this issue Dec 18, 2023 · 6 comments
Labels
contributor friendly A well-scoped, approachable issue for someone looking to contributor. gui GUI or app issue regardless of platform (i.e. Swift, GTK) os/linux

Comments

@Delta456
Copy link
Collaborator

The terminal currently allows separating multiple tabs of a window into separate windows. However, there is no functionality to combine those windows back into tabs for a single window or combine multiple windows into tabs.

The splitting logic seems to be done using GTK itself. @mitchellh on Discord said a custom drag and dropper has to be implemented to achieve this.

image

@mitchellh
Copy link
Contributor

@mitchellh on Discord said a custom drag and dropper has to be implemented to achieve this.

I believe so, happy to be wrong on this one but the last time I looked into this this seemed to be the case which is why I didn't do it at the time.

Note that if a tab bar already exists in both windows, you can drag the tab from one window to another. This is automatically handled by GTK. I know that's not this issue but I'm noting that.

@Delta456
Copy link
Collaborator Author

Note that if a tab bar already exists in both windows, you can drag the tab from one window to another. This is automatically handled by GTK. I know that's not this issue but I'm noting that.

Yes, that works and the screenshot was taken after that!

@mitchellh mitchellh added the contributor friendly A well-scoped, approachable issue for someone looking to contributor. label Dec 19, 2023
@mitchellh
Copy link
Contributor

I'm going to mark this as contributor friendly. It isn't the easiest issue we have open but it is very well scoped using a very popular toolkit so it should be approachable for someone motivated.

@Pangoraw
Copy link
Member

Pangoraw commented Feb 1, 2024

I have made some progress on this in https://github.com/mitchellh/ghostty/compare/main...Pangoraw:ghostty:gtk_dnd?expand=1. But I am hitting what I believe is a gtk bug where the destroy signal for the tab is not run when it has been dragged from one notebook to another. Note that this happen even with the default notebook drag handler and also when the same notebook is used as the source and target. I was able to reproduce the problem in pure C so I don't really know where to go from here (https://gist.github.com/Pangoraw/c2ecddc05eeca098933511b9c773f38a).

@mitchellh
Copy link
Contributor

I did 29b3f9d which enables tabs to be dragged into another window's tab bar. You can't yet drag windows onto each other, though but that's feature parity with macOS at least.

@mitchellh
Copy link
Contributor

I want to note since #2051, I'm okay making this libadwaita only if that makes things easier.

@mitchellh mitchellh added os/linux gui GUI or app issue regardless of platform (i.e. Swift, GTK) and removed enhancement labels Oct 2, 2024
@mitchellh mitchellh removed this from the 1.0 Public Release milestone Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor friendly A well-scoped, approachable issue for someone looking to contributor. gui GUI or app issue regardless of platform (i.e. Swift, GTK) os/linux
Projects
None yet
Development

No branches or pull requests

3 participants