[mono/monodevelop] 25486ede: When determining if there is a non-GTK modal window running, we can't just

"Cody Russell ([email protected])" <[email protected]>
Newsgroups gmane.comp.gnome.mono.patches
Message-ID <00000141e779c391-dcac8942-06d3-42e6-9596-2ef0cd586b7d-000000@email.amazonses.com>
   Branch: refs/heads/master
     Home: https://github.com/mono/monodevelop
  Compare: https://github.com/mono/monodevelop/compare/e8fdedb643e4...25486eded491

   Commit: 25486eded491665ae6221debd39538e8648adcdf
   Author: Cody Russell <[email protected]> (bratsche)
     Date: 2013-10-23 22:38:23 GMT
      URL: https://github.com/mono/monodevelop/commit/25486eded491665ae6221debd39538e8648adcdf

When determining if there is a non-GTK modal window running, we can't just
assume that any NSWindow that is not associated with a GtkWindow is a
modal window.  On Mavericks when we go into fullscreen mode we get an
NSStatusBarWindow in the list which is not associated with a GtkWindow, so
we must now check for that.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=14469

Changed paths:
  M main/src/addins/MacPlatform/MacPlatform.cs

Modified: main/src/addins/MacPlatform/MacPlatform.cs
===================================================================
@@ -686,7 +686,9 @@ public override void SetIsFullscreen (Gtk.Window window, bool isFullscreen)
 
 		public override bool IsModalDialogRunning ()
 		{
-			return GtkQuartz.GetToplevels ().Any (t => t.Key.IsVisible && (t.Value == null || t.Value.Modal));
+			var toplevels = GtkQuartz.GetToplevels ();
+
+			return toplevels.Any (t => t.Key.IsVisible && (t.Value == null || t.Value.Modal) && !t.Key.DebugDescription.StartsWith("<NSStatusBarWindow"));
 		}
 	}
 }


_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.