[dconf-editor] Fix popover position.



commit c9749759c60474a16e31bb605d4e7bd2aa339eab
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Thu Jan 26 19:39:08 2017 +0100

    Fix popover position.

 editor/registry-view.vala |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/editor/registry-view.vala b/editor/registry-view.vala
index 1e369d1..5876b7f 100644
--- a/editor/registry-view.vala
+++ b/editor/registry-view.vala
@@ -332,7 +332,16 @@ class RegistryView : Grid, PathElement
         if (event.button == Gdk.BUTTON_SECONDARY)
         {
             ClickableListBoxRow row = (ClickableListBoxRow) widget;
-            row.show_right_click_popover (get_current_delay_mode (), (int) (event.x));
+
+            int event_x = (int) event.x;
+            if (event.window != widget.get_window ())   // boolean value switch
+            {
+                int widget_x, unused;
+                event.window.get_position (out widget_x, out unused);
+                event_x += widget_x;
+            }
+
+            row.show_right_click_popover (get_current_delay_mode (), event_x);
             rows_possibly_with_popover.append (row);
         }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]