Skip to content


terminal-window: Fix warnings with menu popup
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0w authored and raveit65 committed Sep 4, 2018
1 parent 7958d12 commit 9081ba9
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/terminal-window.c
Expand Up @@ -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)))
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9081ba9

Please sign in to comment.