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>2014-12-10 19:44:30 +0300
committerCody Russell <cody@jhu.edu>2014-12-10 19:46:37 +0300
commitc1eb329cc5aab6f19a453551a6ce530c448c0645 (patch)
treeea0df09ab93c0f46ae2b5cef5b96f69fd85e8c5c /main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands
parent24bebdca53445f205db358ed5c926dc93552042e (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.cs6
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 {