[balsa/popover: 24/37] compose window: Pop up the menu at the pointer
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/popover: 24/37] compose window: Pop up the menu at the pointer
- Date: Thu, 4 Jun 2020 21:56:06 +0000 (UTC)
commit 62eb299501bed96486c223efa2eba32ca485c92f
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Fri May 8 19:43:34 2020 -0400
compose window: Pop up the menu at the pointer
Pop up the context menu actually *at* the pointer, not several px
higher.
src/sendmsg-window.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/sendmsg-window.c b/src/sendmsg-window.c
index 938df3d7d..d4d4a5af8 100644
--- a/src/sendmsg-window.c
+++ b/src/sendmsg-window.c
@@ -2441,11 +2441,16 @@ attachment_button_press_cb(GtkWidget * widget, GdkEventButton * event,
if (attach_info != NULL) {
if (attach_info->popup_menu != NULL) {
GdkRectangle rectangle;
+ gint x, y;
+
+ gtk_tree_view_convert_bin_window_to_widget_coords(tree_view,
+ event->x, event->y,
+ &x, &y);
/* Pop up above the pointer */
- rectangle.x = event->x;
+ rectangle.x = x;
rectangle.width = 0;
- rectangle.y = event->y;
+ rectangle.y = y;
rectangle.height = 0;
gtk_popover_set_pointing_to(GTK_POPOVER(attach_info->popup_menu),
&rectangle);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]