launching new Terminator switches tabs on existing ones

Bug #1589473 reported by Mickey
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Terminator
Confirmed
Medium
Unassigned

Bug Description

whenever I launch a new Terminator process, the existing ones all switch to the last tab from the right.
using latest build on latest Mint.

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

I can confirm this with the gtk3 branch.

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Gtk2 as well. Seems that this is only if you are launching with the DBus active (i.e. daemon mode) Using the "-u" option to ignore the existing processes DBus interface, or disabling the DBus server altogether in the preferences stops this occurring. (not a workaround, just something of note.)

Changed in terminator:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
M. Hanselmann (hansmi) wrote :

The described behaviour seems to stem from the fact that updating the layout via ipc.new_window_cmdline invokes Terminal.ensure_visible_and_focussed for every active terminal, thus changing the notebook page. Proposed patch to skip such call unless it's already on the current notebook page:

--- a/terminatorlib/terminator.py
+++ b/terminatorlib/terminator.py
@@ -379,7 +379,7 @@ class Terminator(Borg):
                     # Set the notebook entry, then ensure Terminal is visible and focussed
                     urn = page_last_active_term.urn
                     notebook.last_active_term[notebook.get_nth_page(page)] = page_last_active_term
- if urn:
+ if urn and page == notebook.get_current_page():
                         term = self.find_terminal_by_uuid(urn)
                         if term:
                             term.ensure_visible_and_focussed()

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Question: Have you tested with this patch whether the per tab active terminal is actually active when you switch to that tab immediately after loading. I can't look into this right now, but my sense is that the last active term is no longer set for non-active tabs after loading a layout. Instead switching to an inactive tab, the last term created is the one with focus, or even possibly no active terminal.

Revision history for this message
M. Hanselmann (hansmi) wrote :

I tested using multiple terminals per tab (split horizontally) and focus was always on the previously selected terminal upon returning to a tab. Obviously I may have missed something as I'm not familiar with the code base. This is how I tested:

1. Open 3 tabs
2. Leave tab 1 alone (one terminal)
3. Split tab 2 to two and tab 3 to three terminals (or more)
4. Focus a terminal in each tab
5. Launch new Terminator instance, causing a new window to be created via D-Bus
6. Verify that the previously selected terminals are still have focus when selecting the tab
7. Focus other terminals and repeat

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Yeah, this is where knowledge of the code base is useful. Knowing all the points that call the code where your patch is, when, and why, you can often intuit impacts. Of course not always, and this is why so much focus in commercial software is around testing.

My intuited regression test for this would be:
1. Create a layout containing multiple tabs where all tabs have multiple splits.
2. Pick a random terminal on each tab, and make a note of which one was active in each tab.
3. Save the layout as say "ActiveTermTabTest"
4. Using another terminal program (i.e. gnome-terminal) start with "terminator -u -l ActiveTermTabTest"
5. Check which terminal is active in each tab and compare to which was active when you saved.

I think you'll find that the inactive tabs are not all remembering the last active tab correctly (random luck says some might be).

Revision history for this message
Francois Billard (zull) wrote :

2016 - 2021 no fix yet ??

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.