Created
August 6, 2013 21:13
-
-
Save bratsche/6168692 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git main/src/addins/MacPlatform/MacPlatform.cs main/src/addins/MacPlatform/MacPlatform.cs | |
index a55635f..b3f3b79 100644 | |
--- main/src/addins/MacPlatform/MacPlatform.cs | |
+++ main/src/addins/MacPlatform/MacPlatform.cs | |
@@ -285,14 +285,22 @@ namespace MonoDevelop.MacIntegration | |
ApplicationEvents.Reopen += delegate (object sender, ApplicationEventArgs e) { | |
if (IdeApp.Workbench != null && IdeApp.Workbench.RootWindow != null) { | |
IdeApp.Workbench.RootWindow.Deiconify (); | |
+ IdeApp.Workbench.RootWindow.Visible = true; | |
// This is a workaround to a GTK+ bug. The HasTopLevelFocus flag is not properly | |
// set when the main window is restored. The workaround is to hide and re-show it. | |
// Since this happens before the next mainloop cycle, the window isn't actually affected. | |
- IdeApp.Workbench.RootWindow.Hide (); | |
- IdeApp.Workbench.RootWindow.Show (); | |
+ // IdeApp.Workbench.RootWindow.Hide (); | |
+ // IdeApp.Workbench.RootWindow.Show (); | |
IdeApp.Workbench.RootWindow.Present (); | |
+ Console.WriteLine ("[1] HasToplevelFocus == {0}", IdeApp.Workbench.RootWindow.HasToplevelFocus); | |
+ | |
+ GLib.Timeout.Add (1, delegate { | |
+ Console.WriteLine ("[2] HasToplevelFocus == {0}", IdeApp.Workbench.RootWindow.HasToplevelFocus); | |
+ return false; | |
+ }); | |
+ | |
e.Handled = true; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment