Suppress ResizeView (the grey rows & columns view) when entering/leaving fullscreen mode, and when zooming. Its useful only when manually resizing the window. In the other cases it simply flickers by.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29943 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
64805bb7f0
commit
3b5c46634d
@ -253,6 +253,7 @@ TermView::_InitObject(int32 argc, const char** argv)
|
||||
fFontHeight = 0;
|
||||
fFontAscent = 0;
|
||||
fFrameResized = false;
|
||||
fResizeViewDisableCount = 0;
|
||||
fLastActivityTime = 0;
|
||||
fCursorState = 0;
|
||||
fCursorHeight = 0;
|
||||
@ -1303,9 +1304,12 @@ TermView::FrameResized(float width, float height)
|
||||
fResizeView->ResizeTo(width * 1.5, height * 1.5);
|
||||
fResizeView->MoveTo((Bounds().Width() - fResizeView->Bounds().Width()) / 2,
|
||||
(Bounds().Height()- fResizeView->Bounds().Height()) / 2);
|
||||
if (!hasResizeView)
|
||||
if (!hasResizeView && fResizeViewDisableCount < 1)
|
||||
AddChild(fResizeView);
|
||||
|
||||
if (fResizeViewDisableCount > 0)
|
||||
fResizeViewDisableCount--;
|
||||
|
||||
SetTermSize(rows, columns, false);
|
||||
|
||||
fFrameResized = true;
|
||||
@ -2557,3 +2561,10 @@ TermView::_ScrollToRange(TermPos start, TermPos end)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
TermView::DisableResizeView(int32 disableCount = 1)
|
||||
{
|
||||
fResizeViewDisableCount += disableCount;
|
||||
}
|
||||
|
||||
|
@ -83,6 +83,8 @@ public:
|
||||
|
||||
void InitiateDrag();
|
||||
|
||||
void DisableResizeView(int32 disableCount = 1);
|
||||
|
||||
protected:
|
||||
virtual void AttachedToWindow();
|
||||
virtual void DetachedFromWindow();
|
||||
@ -196,6 +198,7 @@ private:
|
||||
|
||||
// frame resized flag.
|
||||
bool fFrameResized;
|
||||
int32 fResizeViewDisableCount;
|
||||
|
||||
// Cursor Blinking, draw flag.
|
||||
bigtime_t fLastActivityTime;
|
||||
|
@ -482,6 +482,7 @@ TermWindow::MessageReceived(BMessage *message)
|
||||
|
||||
case FULLSCREEN:
|
||||
if (!fSavedFrame.IsValid()) { // go fullscreen
|
||||
_ActiveTermView()->DisableResizeView();
|
||||
float mbHeight = fMenubar->Bounds().Height() + 1;
|
||||
fSavedFrame = Frame();
|
||||
BScreen screen(this);
|
||||
@ -495,6 +496,7 @@ TermWindow::MessageReceived(BMessage *message)
|
||||
ResizeTo(screen.Frame().Width()+1, screen.Frame().Height()+1);
|
||||
MoveTo(screen.Frame().left, screen.Frame().top);
|
||||
} else { // exit fullscreen
|
||||
_ActiveTermView()->DisableResizeView();
|
||||
float mbHeight = fMenubar->Bounds().Height() + 1;
|
||||
fMenubar->Show();
|
||||
_ActiveTermView()->ScrollBar()->Show();
|
||||
@ -846,6 +848,14 @@ TermWindow::_CheckChildren()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TermWindow::Zoom(BPoint leftTop, float width, float height)
|
||||
{
|
||||
_ActiveTermView()->DisableResizeView();
|
||||
BWindow::Zoom(leftTop, width, height);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TermWindow::_ResizeView(TermView *view)
|
||||
{
|
||||
|
@ -59,6 +59,7 @@ protected:
|
||||
virtual void MessageReceived(BMessage *message);
|
||||
virtual void WindowActivated(bool);
|
||||
virtual void MenusBeginning();
|
||||
virtual void Zoom(BPoint leftTop, float width, float height);
|
||||
|
||||
private:
|
||||
struct Session;
|
||||
|
Loading…
x
Reference in New Issue
Block a user