summaryrefslogtreecommitdiff
path: root/src/terminal-window.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-09-02 15:47:39 +0200
committerraveit65 <[email protected]>2018-09-04 20:55:53 +0200
commit9081ba937a78666df689f9bf6cdf81fa5225fbab (patch)
tree3f7dcc15a05d7457b4f3987c73fe5a3e33d2e31a /src/terminal-window.c
parent7958d12df06b2a5c4cc194ca13b02e42d05b59eb (diff)
downloadmate-terminal-9081ba937a78666df689f9bf6cdf81fa5225fbab.tar.bz2
mate-terminal-9081ba937a78666df689f9bf6cdf81fa5225fbab.tar.xz
terminal-window: Fix warnings with menu popup
Diffstat (limited to 'src/terminal-window.c')
-rw-r--r--src/terminal-window.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/terminal-window.c b/src/terminal-window.c
index 616605a..8b28fbc 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -1425,6 +1425,9 @@ 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)))
{
@@ -1491,7 +1494,17 @@ 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);
- gtk_menu_popup_at_pointer (GTK_MENU (popup_menu), 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);
}
static void