[haiku-bugs] [Haiku] #5969: Terminal size is not correct when 2nd tab is added in zoom/fullscreen

  • From: "romain" <trac@xxxxxxxxxxxx>
  • Date: Tue, 11 May 2010 21:27:18 -0000

#5969: Terminal size is not correct when 2nd tab is added in zoom/fullscreen
-----------------------------------+----------------------------------------
 Reporter:  romain                 |       Owner:  jackburton
     Type:  bug                    |      Status:  new       
 Priority:  normal                 |   Milestone:  R1        
Component:  Applications/Terminal  |     Version:  R1/alpha2 
 Keywords:                         |   Blockedby:            
 Platform:  All                    |    Blocking:            
-----------------------------------+----------------------------------------
 - Start a Terminal
 - Zoom/expand the window
 - add a second tab
 - Select the first tab -> The last line at the bottom of the terminal view
 is no more visible.

 When the terminal window is zoomed or in fullscreen mode, the window size
 cannot be increased to display the SmartTabView. So the TermView of the
 first tab is resized to a smaller size. This resize is done while the
 TermView is detached from the window, so its internal size is changed in
 BView::_ResizeBy, but the FrameResized hook is not called.
 When the first tab is selected later it is resized in
 SmartTabView::Select, but since its size was already changed internaly,
 this call has no effect.

 Enclosed is a partial patch to fix this:
 - Each time a TermView is attached to a window, SetTermSize is called to
 make the row/column count match the view size.
 - In order to get this working at startup, the TermView size is
 initialized in its contructor.

 However there is another issue I could not fix correctly: Somewhere when
 initializing the SmartTabView, the TermView is resized to very small
 values. In the patch, a test is added to prevent resizing the TermView to
 too small settings.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/5969>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: