Bug 366026 - New tab's shell does not always get focus
New tab's shell does not always get focus
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
2.12.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2006-10-28 00:55 UTC by Morten Welinder
Modified: 2007-02-09 03:17 UTC (History)
1 user (show)

See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments

Description Morten Welinder 2006-10-28 00:55:50 UTC
(This is with whatever version SuSE 10.1 comes with.)

1. Move focus to something else, say firefox.
2. Move focus back to gnoem terminal.  (I have focus-follows-mouse, but
   if you use click-to-focus, do so in the menu area, not the terminal
   area.)
3. Select a new tab from the menu.

Expected: new tab, ready for typing.  Cursor is a block.

Observed about half the time: focus is in the tab.  Cursor is a frame.
Comment 1 Mariano Suárez-Alvarez 2006-10-28 03:51:20 UTC
After playing with this for a while, I cannot reproduce this (By ‘select a new tab from the menu’, what do you mean, exactly? Going to File->New Tab->Default?)

However, if I click on a tab (thereby putting the focus in the tab), then click on some other window, e.g. Firefox, and then click back on the menubar and File->New Tab->Default, then the new tab gets created but the focus remains on the tab. Probably we should focus the new terminal upon creating...

Is this what you are seeing, or...?
Comment 2 Morten Welinder 2006-10-30 15:25:36 UTC
I'm not entirely sure what causes the effect, but yes I do see the focus
end up on the tab.

And yes, "File->New Tab->Default" is what I do.

Is there ever a reason to focus the tab?  Shouldn't the focus always
be redirected to the terminal?  The point of clicking the tab is to
make the terminal visible and ready for work, not because I want to
do something to/with the tab.  (And there is nothing to do with the
tab, as far as I can tell anyway.)
Comment 3 Mariano Suárez-Alvarez 2006-11-23 20:04:26 UTC
Following you steps I cannot reproduce this. I do get the focus on the tab of the new tab if before doing File->New Tab->Default, I click on the tab of the current tab (that puts the focus on the tab) 

Btw, it is sort of clear that the terminal should be focused when a new tab is created. I've just committed this to HEAD:

    2006-11-23  Mariano Suárez-Alvarez  <msuarezalvarez@arnet.com.ar>

        * src/terminal.c(terminal_app_new_terminal): put the focus on a new
        screen when we create a tab.

which takes care of that.
Comment 4 Mariano Suárez-Alvarez 2007-02-09 03:17:54 UTC
Morten, that patch should take care of focusing new terminals when they are created in tabs. I'll close this.

Please reopen if it did not do it for you.

Note You need to log in before you can comment on or make changes to this bug.