Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Russell <cody@jhu.edu>2015-05-27 04:19:42 +0300
committerCody Russell <cody@jhu.edu>2015-05-27 04:23:17 +0300
commit0315aef20f4c0e84441d9f5e05f516e037b1151b (patch)
tree60ca29ce2a964ca635442e9d8254c4bc90e12ce6 /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop
parentdf35da8e8615c20ac6dc0f80884b5a1add01c33e (diff)
[Ide] Win32 workaround for Window.Present() breaking window snapping
When we select a different document we want to focus that document's floating window. But calling Present() breaks edge snapping mode in Win32, so we now raise/focus instead. Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=22570
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs
index bba44c2296..6f92157347 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs
@@ -434,7 +434,13 @@ namespace MonoDevelop.Ide.Desktop
/// </summary>
public virtual void GrabDesktopFocus (Gtk.Window window)
{
- window.Present ();
+ if (Platform.IsWindows && window.IsRealized) {
+ /* On Windows calling Present() will break out of window edge snapping mode. */
+ window.GdkWindow.Focus (0);
+ window.GdkWindow.Raise ();
+ } else {
+ window.Present ();
+ }
}
internal virtual void RemoveWindowShadow (Gtk.Window window)