From 788db1611148a030de9df8b2ae09eb453aa69e94 Mon Sep 17 00:00:00 2001 From: iain holmes Date: Thu, 6 Jun 2019 16:46:35 +0100 Subject: [Mac] Don't resize the window frame when placing the window Calling setFrame on the NSWindow resizes the window, but not the Gtk contents causing offset issues in 8.1 There appears to be a race condition caused by making the startup sequence more async than in previous versions. This is triggered by starting MonoDevelop from Finder by double clicking on a solution file. The call to Ide.OpenFilesAsync occurs earlier in the startup sequence now, and the call to Workbench.Present causes the error. Workbench.Show is called later in the method by OpenWorkbenchItem, and if we remove the first call to Workbench.Present, then the workbench window opens correctly, but slightly later. I am still tracking this down, but removing this setFrame call seems to be the least dangerous fix for this bug until we fully understand what is going on. Fixes VSTS #900933 --- main/src/addins/MacPlatform/MacPlatform.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/src/addins') diff --git a/main/src/addins/MacPlatform/MacPlatform.cs b/main/src/addins/MacPlatform/MacPlatform.cs index d60c4f79c8..90116f6d53 100644 --- a/main/src/addins/MacPlatform/MacPlatform.cs +++ b/main/src/addins/MacPlatform/MacPlatform.cs @@ -1281,7 +1281,7 @@ namespace MonoDevelop.MacIntegration y += GetTitleBarHeight (w); var dr = FromDesktopRect (new Gdk.Rectangle (x, y, width, height)); var r = w.FrameRectFor (dr); - w.SetFrame (r, true); + base.PlaceWindow (window, x, y, width, height); } -- cgit v1.2.3