diff options
author | David Karlaš <david.karlas@xamarin.com> | 2015-06-19 12:58:45 +0300 |
---|---|---|
committer | David Karlaš <david.karlas@xamarin.com> | 2015-06-19 13:04:58 +0300 |
commit | b6a482c4e6926c5abc2170da63400ef163d52c44 (patch) | |
tree | f2046d543aa2c60e8d888bf17acc85dd211bd7dd /main/src/core/MonoDevelop.Ide/MonoDevelop.Components | |
parent | 6cb8d9d374053da26d6dca5192bc944b20d051b8 (diff) |
Bug 31032 - Popup is not appearing adjacent to the Eye icon in exception window.
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Components')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs index 476c80d45e..d2cd6e11df 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs @@ -306,9 +306,15 @@ namespace MonoDevelop.Components public static Gdk.Point ToScreenCoordinates (Gtk.Widget widget, Gdk.Window w, int x, int y) { int ox, oy; - w.GetOrigin (out ox, out oy); - ox += widget.Allocation.X; - oy += widget.Allocation.Y; + w.GetOrigin (out ox, out oy);
+ //Bug 31032 - this is workaround bug in GTK on Windows OS which has widget.Allocation.X/Y
+ //relative to widget.GdkWindow.Toplevel instead to widget.GdkWindow which is GdkWindow decicated
+ //to TreeView so widget.Allocation.X/Y should always be 0,0(which is true on Mac)
+ //hence skipping adding Allocation.X/Y since they should always be 0,0 anyway
+ if (!(widget is TreeView)) {
+ ox += widget.Allocation.X;
+ oy += widget.Allocation.Y;
+ } return new Gdk.Point (ox + x, oy + y); } |