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

Unzoom terminal on interaction #553

Merged
merged 3 commits into from
Dec 26, 2021

Conversation

Vulcalien
Copy link
Member

Fixes #550

These changes make a zoomed/maximized terminal unzoom on interactions such as: creating a new tab, resizing the terminal, splitting it etc...

There are still problems with two of these interactions: rotating the terminal and moving to another terminal.
The function get_allocation() returns (width: 1, height: 1, ...) right after an unzoom.

The bug can be replicated with a few terminals (I use one on the left, one top-right, one bottom-right). Zoom the bottom-right one and try to rotate or move to the top-right terminal.
What I get for the rotation is that one terminal is big, the other two are very small.

There is a bug: strange behavior for navigation and rotation
@Vulcalien Vulcalien marked this pull request as ready for review December 18, 2021 10:48
@Vulcalien
Copy link
Member Author

Vulcalien commented Dec 18, 2021

Now it works, but there is an annoying bug: after an unzoom, the terminal is moved by a single pixel, making the navigation after an unzoom inconsistent. It's a different issue, so I'll see if I can fix that with another PR.

Edit: I think this is ready for merge, if no problems are found here.

@mattrose
Copy link
Member

So, I have to admit, I'm not clear on what the problem is with this issue. That seems to be a "me" issue, as it was clear to you, but at the same time, I'm hesitant to merge something that you think is not quite complete because I have no idea 😄 . If you could open the other PR and then I can merge them in at the same time, that'd be great.

@mattrose
Copy link
Member

I think I'm starting to figure this one out after having looked at it and read your patch, and it looks good to me. If you could either open a new bug or come up with a new PR for the other issue you mentioned, that would be great. That way there's some evidence of it other than in a closed PR, in case you get busy with something else, or there's something else blocking your fix.

@Vulcalien
Copy link
Member Author

Here is how to reproduce the issue.

  1. Split the terminal
  2. Zoom one of the terminal
  3. Try to move to the other terminal (with keyboard shortcuts)

Current behavior:
nothing will happen, and the zoomed terminal will remain zoomed.

Desired behavior:
the terminal should unzoom and then move to the other terminal.

Other examples of "interactions" that should trigger an unzoom are a split, a rotation, a "new tab".
So with the changes in this PR, if you try to split, the zoomed terminal will first unzoom and then split as it should.

This is more or less how tmux handles the behavior as well.


I will make the new issue.

@mattrose
Copy link
Member

Merging. Sorry about the wait.

@mattrose mattrose merged commit 96aa749 into gnome-terminator:master Dec 26, 2021
@Vulcalien Vulcalien deleted the zoom-terminal-switch branch December 27, 2021 10:26
@Vulcalien
Copy link
Member Author

Finally wrote the issue, I wanted to make sure to see the real problem. Apparently, it's focus lost.

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

Successfully merging this pull request may close these issues.

Switch focus and splits don't work when terminal is zoomed
2 participants