Opened 14 years ago
Closed 14 years ago
#5969 closed bug (fixed)
Terminal size is not correct when 2nd tab is added in zoom/fullscreen
Reported by: | romain | Owned by: | jackburton |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/Terminal | Version: | R1/alpha2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
- 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.
Attachments (2)
Change History (6)
by , 14 years ago
Attachment: | terminal.diff added |
---|
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Here is another patch.
The small values come from the default size of the TermWindow that is set in the TermApp constructor:
- TermWindow is created with width/height 50
- TermView is created with default col/row values
- TermView is added to TabView -> This resizes the TermView to the size of the TermWindow and attaches it. This is why the first patch changes the terminal size to very small values.
- TermWindow is resized with the size of the TermView (when adding the first TermView), that is very small size.
This second patch simply resizes the TermWindow before the TermView is added to the window. With this termView::AttachedToWindow is always called with correct bounds.
by , 14 years ago
Attachment: | terminal2.diff added |
---|
comment:3 by , 14 years ago
patch: | 0 → 1 |
---|
comment:4 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Applied in hrev36875. Thanks a lot!
Thanks for the patch!