Charlie Kindel 5 年之前
父節點
當前提交
d34dfc5d78
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      Terminal.Gui/Core.cs

+ 3 - 3
Terminal.Gui/Core.cs

@@ -1643,14 +1643,14 @@ namespace Terminal.Gui {
 			nx = Math.Max (x, 0);
 			nx = nx + top.Frame.Width > Driver.Cols ? Math.Max (Driver.Cols - top.Frame.Width, 0) : nx;
 			bool m, s;
-			if (SuperView == null)
+			if (SuperView == null || SuperView.GetType() != typeof(Toplevel))
 				m = Application.Top.MenuBar != null;
 			else
 				m = ((Toplevel)SuperView).MenuBar != null;
 			int l = m ? 1 : 0;
 			ny = Math.Max (y, l);
-			if (SuperView == null)
-				s = Application.Top.StatusBar != null;
+			if (SuperView == null || SuperView.GetType() != typeof(Toplevel))
+				s = Application.Top.HasStatusBar;
 			else
 				s = ((Toplevel)SuperView).StatusBar != null;
 			l = s ? Driver.Rows - 1 : Driver.Rows;