Terminal:send resize notify on attaching window to view
During adding the second tab the view in the first one may change its lines count in case the Terminal window was maximized. Send resize notification to client rpogram on every reattaching view to window. Fixes #9809
This commit is contained in:
@@ -606,13 +606,13 @@ TermView::SetTermSize(int rows, int columns, bool notifyShell)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TermView::SetTermSize(BRect rect)
|
TermView::SetTermSize(BRect rect, bool notifyShell)
|
||||||
{
|
{
|
||||||
int rows;
|
int rows;
|
||||||
int columns;
|
int columns;
|
||||||
|
|
||||||
GetTermSizeFromRect(rect, &rows, &columns);
|
GetTermSizeFromRect(rect, &rows, &columns);
|
||||||
SetTermSize(rows, columns, false);
|
SetTermSize(rows, columns, notifyShell);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1162,7 +1162,7 @@ TermView::AttachedToWindow()
|
|||||||
// update the terminal size because it may have changed while the TermView
|
// update the terminal size because it may have changed while the TermView
|
||||||
// was detached from the window. On such conditions FrameResized was not
|
// was detached from the window. On such conditions FrameResized was not
|
||||||
// called when the resize occured
|
// called when the resize occured
|
||||||
SetTermSize(Bounds());
|
SetTermSize(Bounds(), true);
|
||||||
MakeFocus(true);
|
MakeFocus(true);
|
||||||
if (fScrollBar) {
|
if (fScrollBar) {
|
||||||
fScrollBar->SetSteps(fFontHeight, fFontHeight * fRows);
|
fScrollBar->SetSteps(fFontHeight, fFontHeight * fRows);
|
||||||
|
|||||||
@@ -81,7 +81,8 @@ public:
|
|||||||
int Columns() const;
|
int Columns() const;
|
||||||
BRect SetTermSize(int rows, int cols,
|
BRect SetTermSize(int rows, int cols,
|
||||||
bool notifyShell);
|
bool notifyShell);
|
||||||
void SetTermSize(BRect rect);
|
void SetTermSize(BRect rect,
|
||||||
|
bool notifyShell = false);
|
||||||
void GetTermSizeFromRect(const BRect &rect,
|
void GetTermSizeFromRect(const BRect &rect,
|
||||||
int *rows, int *columns);
|
int *rows, int *columns);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user