Comment 3 for bug 1589473

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()