Skip to content

Commit

Permalink
Merge pull request #605 from BDisp/toplevel-repaint
Browse files Browse the repository at this point in the history
Fixes #604 Toplevel repaint.
  • Loading branch information
tig authored Jun 3, 2020
2 parents cb04a81 + 020d43f commit 6631a0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Terminal.Gui/Core/Toplevel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public override void Redraw (Rect bounds)
if (IsCurrentTop || this == Application.Top) {
if (NeedDisplay != null && !NeedDisplay.IsEmpty) {
Driver.SetAttribute (Colors.TopLevel.Normal);
Clear (Frame);
Clear (bounds);
Driver.SetAttribute (Colors.Base.Normal);
}
foreach (var view in Subviews) {
Expand Down
5 changes: 4 additions & 1 deletion Terminal.Gui/Core/Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ public override bool MouseEvent (MouseEvent mouseEvent)
if (dragPosition.HasValue) {
if (SuperView == null) {
Application.Top.SetNeedsDisplay (Frame);
Application.Top.Redraw (Bounds);
// Redraw the entire app window using just our Frame. Since we are
// Application.Top, and our Frame always == our Bounds (Location is always (0,0))
// our Frame is actually view-relative (which is what Redraw takes).
Application.Top.Redraw (Frame);
} else {
SuperView.SetNeedsDisplay (Frame);
}
Expand Down

0 comments on commit 6631a0f

Please sign in to comment.