[balsa/popover: 25/65] balsa-index: Improve popup positioning at pointer
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [balsa/popover: 25/65] balsa-index: Improve popup positioning at pointer
- Date: Fri, 21 Aug 2020 19:09:11 +0000 (UTC)
commit daa6c2a8abc1d860f09499177472f30e6ee1fd3c
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Thu May 21 17:30:35 2020 -0400
    balsa-index: Improve popup positioning at pointer
 src/balsa-index.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/balsa-index.c b/src/balsa-index.c
index 031e8ea05..daa0f27ab 100644
--- a/src/balsa-index.c
+++ b/src/balsa-index.c
@@ -2126,7 +2126,13 @@ bndx_do_popup(BalsaIndex * index)
     gtk_widget_get_allocation(GTK_WIDGET(index), &allocation);
     if (event != NULL && gdk_event_triggers_context_menu((GdkEvent *) event)) {
         /* Pop up to the right of the pointer */
-        allocation.width = event->x;
+        gtk_tree_view_convert_bin_window_to_widget_coords(GTK_TREE_VIEW(index),
+                                                          (gint) event->x,
+                                                          (gint) event->y,
+                                                          &allocation.x,
+                                                          &allocation.y);
+        allocation.width = 0;
+        allocation.height = 0;
     } else {
         /* Pop up to the right of the "From" column */
         allocation.width = balsa_app.index_num_width +
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]