Zoom and maximise do not work if single terminal in a tab

Bug #1501106 reported by Stephen Boddy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Terminator
In Progress
Low
Stephen Boddy

Bug Description

The maximise and zoom have no effect if there is a single terminal under a tab,

Open a window create a new tab, and split it.
On the tab with splits, max/zoom expands to fill whole window.
On the tab with one terminal, max/zoom has no effect.

This might be intended, but I'm not keen. I prefer consistency for these kind of things, an IMO the terminal should still expand, hiding the tabs.

This is present in both 0.98 and gtk3 versions.

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

Just tracking some notes here so I don't lose them.

In notepad::newtab when connecting signals
    'zoom': top_window.zoom,
    'maximise': [top_window.zoom, False],
Have to be added, but that causes an exception in a deferred call to terminals ensure_visible_and_focussed

For some reason at this point the top_level of the terminal is a notebook, not a window, so there is an exception, although it still seems to work. This can be tested and avoided with:
    if not maker.isinstance(window, 'Window'):
        return

ensure_visible_and_focussed is idle_add'ed by notebook::on_tab_switch
on_tab_switch is called by notebook::do_deferred_on_tab_switch
do_deferred_on_tab_switch is idle_add'ed by notebook::deferred_on_tab_switch
deferred_on_tab_switch is called on signal 'switch-page'
'switch-page' happens because the tab containing the child is removed because it is empty.
This also manifests that un-max/zoom place the terminal in a new tab at the end of the list of tabs.
Perhaps need to temporarily disconnect switch-tab signal when disconnecting, and if direct parent of terminal is a notebook, get the index and store it for when restoring.

Changed in terminator:
assignee: nobody → Stephen Boddy (stephen-j-boddy)
status: Triaged → In Progress
Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Does the approach of bug 1518081 make sense to you?

"IMO the terminal should still expand, hiding the tabs" ... yeah, kinda makes sense...

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

The first part of the patch for lp:1518081 is OK, but the second part won't work if I make the single terminal in a tab zoom. I actually have a bunch of work sitting on disk for this case. Turned out trickier than you'd think, and I really need to double-check it first before committing.

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.