summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2020-06-02 22:22:00 +0200
committerRobert Antoni Buj Gelonch <[email protected]>2020-06-20 15:00:59 +0200
commitb6d807fd63fbaa6d5ba6e1b277fde6ae959eb156 (patch)
tree04d8fe4350b33750b8cd639371b80fe66d0a9875
parent3b960c5eaba05fa914488cbf5b3d8262cbed25c3 (diff)
downloadmate-terminal-b6d807fd63fbaa6d5ba6e1b277fde6ae959eb156.tar.bz2
mate-terminal-b6d807fd63fbaa6d5ba6e1b277fde6ae959eb156.tar.xz
restore deprecated gtk_menu_popup for context-menu
fixing weird behaviour with wayland compositor
-rw-r--r--src/terminal-window.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/terminal-window.c b/src/terminal-window.c
index b50378f..66af860 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -1477,9 +1477,6 @@ popup_clipboard_targets_received_cb (GtkClipboard *clipboard,
GtkAction *action;
gboolean can_paste, can_paste_uris, show_link, show_email_link, show_call_link, show_input_method_menu;
int n_pages;
- GdkEvent *event;
- GdkSeat *seat;
- GdkDevice *device;
if (!gtk_widget_get_realized (GTK_WIDGET (screen)))
{
@@ -1552,17 +1549,11 @@ popup_clipboard_targets_received_cb (GtkClipboard *clipboard,
if (!gtk_menu_get_attach_widget (GTK_MENU (popup_menu)))
gtk_menu_attach_to_widget (GTK_MENU (popup_menu),GTK_WIDGET (screen),NULL);
- event = gtk_get_current_event ();
-
- seat = gdk_display_get_default_seat (gdk_display_get_default());
-
- device = gdk_seat_get_pointer (seat);
-
- gdk_event_set_device (event, device);
-
- gtk_menu_popup_at_pointer (GTK_MENU (popup_menu), (const GdkEvent*) event);
-
- gdk_event_free (event);
+ gtk_menu_popup (GTK_MENU (popup_menu),
+ NULL, NULL,
+ NULL, NULL,
+ info->button,
+ info->timestamp);
}
static void