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

Terminal loses focus versus tab title #400

Closed
aplopez opened this issue Mar 5, 2021 · 6 comments · Fixed by #470
Closed

Terminal loses focus versus tab title #400

aplopez opened this issue Mar 5, 2021 · 6 comments · Fixed by #470
Labels
bug Something isn't working

Comments

@aplopez
Copy link

aplopez commented Mar 5, 2021

Describe the bug
When clicking on the current tab's title, the terminal loses the focus which is transferred to the title. It is no longer possible to type on the terminal.
Running terminator -g /dev/null still behaves as described.

To Reproduce
1 - Open at least 2 tabs.

2 - Select a tab by clicking on it and you can type your commands on that terminal.
Step-2

3 - Click (again) on current tab's title as you just did on step 2.

4 - The terminal loses the focus (it is slightly greyed and the red bar become grey), which is transferred to the tab's title (see the dotted-line box around the title) and you can no longer type on the terminal.
Step-4

5 - Click on the terminal itself, and the focus is transferred from the tab's title back to the terminal. You can again type your commands.

Expected behavior
When clicking for a second time (not a double-click) on the tab, the focus should remain on the terminal. This is what seems most logical and what Gnome Terminal does.

Desktop (please complete the following information):

  • RHEL7

Additional context
Seems to be this same old bug on Launchpad which was never fixed.

@mattrose mattrose added the bug Something isn't working label May 31, 2021
@mattrose
Copy link
Member

mattrose commented Jul 2, 2021

So, I think that when you click on the same tab that's associated with the terminal, it transfers focus to the tab itself, not the associated terminal. I wonder if there's a way to associate just a double-click to the associated tab, and not a single-click. I may see how gnome-terminal does this.

@mattrose
Copy link
Member

This is the gnome-terminal fix, apparently:
https://bug746665.bugzilla-attachments.gnome.org/attachment.cgi?id=300270

Not sure how to translate that to python.

@marktimarev
Copy link
Contributor

This is the gnome-terminal fix, apparently:
https://bug746665.bugzilla-attachments.gnome.org/attachment.cgi?id=300270

Not sure how to translate that to python.

Thanks, I will try to figure out how implement it

@marktimarev
Copy link
Contributor

marktimarev commented Jul 22, 2021

Yeah, I got it, they hook the event when a tat grabs focus and then push the focus back to the inner terminal manually.
Going to push a MR soon.

@mattrose
Copy link
Member

Wow, that's great! Thanks and looking forward to the PR.

@marktimarev
Copy link
Contributor

It was apparently easier than the fix in the gnome-terminal.
It solves the issue for me, please check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants