diff options
author | Cody Russell <cody@jhu.edu> | 2014-12-10 19:44:30 +0300 |
---|---|---|
committer | Cody Russell <cody@jhu.edu> | 2014-12-10 19:46:37 +0300 |
commit | c1eb329cc5aab6f19a453551a6ce530c448c0645 (patch) | |
tree | ea0df09ab93c0f46ae2b5cef5b96f69fd85e8c5c /main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands | |
parent | 24bebdca53445f205db358ed5c926dc93552042e (diff) |
[Mac] Get the pointer coordinates from the window, not display.
When we don't pass in a GdkEvent and need to determine the mouse
coordinates, get them from the GdkWindow rather than GdkDisplay.
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=23404
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs index 490c249e07..14722da4ee 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs @@ -779,7 +779,11 @@ namespace MonoDevelop.Components.Commands x = (int)evt.X; y = (int)evt.Y; } else { - Gdk.Display.Default.GetPointer (out x, out y); + Gdk.ModifierType mod; + parent.GdkWindow.GetPointer (out x, out y, out mod); + + var titleBarHeight = MonoDevelop.Components.Mac.GtkMacInterop.GetTitleBarHeight (); + y -= titleBarHeight; } Gtk.Application.Invoke (delegate { |