[balsa/popover: 22/28] balsa-index, balsa-message: Check GdkEvent
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/popover: 22/28] balsa-index, balsa-message: Check GdkEvent
- Date: Thu, 21 May 2020 01:45:27 +0000 (UTC)
commit 694d692ac5f727f873113cb617b554ba4a5f6aab
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sun May 10 11:43:05 2020 -0400
balsa-index, balsa-message: Check GdkEvent
Check that gdk_event_triggers_context_menu before using it to position
the popover.
src/balsa-index.c | 2 +-
src/balsa-message.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/balsa-index.c b/src/balsa-index.c
index 523bce42d..82a98cd85 100644
--- a/src/balsa-index.c
+++ b/src/balsa-index.c
@@ -2084,7 +2084,7 @@ bndx_do_popup(BalsaIndex * index, GdkEventButton * event)
g_menu_insert_item(index->popup_menu, index->move_position, item);
gtk_widget_get_allocation(GTK_WIDGET(index), &allocation);
- if (event != NULL) {
+ if (event != NULL && gdk_event_triggers_context_menu((GdkEvent *) event)) {
/* Pop up to the right of the pointer */
allocation.width = event->x;
} else {
diff --git a/src/balsa-message.c b/src/balsa-message.c
index a6515afee..45ef5b336 100644
--- a/src/balsa-message.c
+++ b/src/balsa-message.c
@@ -1102,7 +1102,7 @@ tree_mult_selection_popup(BalsaMessage * balsa_message, GdkEventButton * event,
if (selected == 1) {
BalsaPartInfo *info = BALSA_PART_INFO(balsa_message->save_all_list->data);
if (info->popup_menu != NULL) {
- if (event != NULL) {
+ if (event != NULL && gdk_event_triggers_context_menu((GdkEvent *) event)) {
GdkRectangle rectangle;
/* Pop up above the pointer */
@@ -1118,7 +1118,7 @@ tree_mult_selection_popup(BalsaMessage * balsa_message, GdkEventButton * event,
g_list_free(balsa_message->save_all_list);
balsa_message->save_all_list = NULL;
} else if (selected > 1) {
- if (event != NULL) {
+ if (event != NULL && gdk_event_triggers_context_menu((GdkEvent *) event)) {
GdkRectangle rectangle;
/* Pop up above the pointer */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]