[gtk+/wip/attach-params-pass-event: 5/15] bdbbf39b gtkappchooserwidget use gdkevent
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/attach-params-pass-event: 5/15] bdbbf39b gtkappchooserwidget use gdkevent
- Date: Thu, 18 Feb 2016 16:08:26 +0000 (UTC)
commit 4486ffe4e08ced0d31875f84ccdb8bd83b4f8bc1
Author: William Hua <william hua canonical com>
Date: Tue Feb 16 16:45:48 2016 -0500
bdbbf39b gtkappchooserwidget use gdkevent
gtk/gtkappchooserwidget.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkappchooserwidget.c b/gtk/gtkappchooserwidget.c
index 6a66269..029596b 100644
--- a/gtk/gtkappchooserwidget.c
+++ b/gtk/gtkappchooserwidget.c
@@ -223,20 +223,20 @@ popup_menu_detach (GtkWidget *attach_widget,
}
static gboolean
-widget_button_press_event_cb (GtkWidget *widget,
- GdkEventButton *event,
- gpointer user_data)
+widget_button_press_event_cb (GtkWidget *widget,
+ GdkEvent *event,
+ gpointer user_data)
{
GtkAppChooserWidget *self = user_data;
- if (event->button == GDK_BUTTON_SECONDARY && event->type == GDK_BUTTON_PRESS)
+ if (event->type == GDK_BUTTON_PRESS && event->button.button == GDK_BUTTON_SECONDARY)
{
GAppInfo *info;
GtkWidget *menu;
GList *children;
gint n_children;
- info = get_app_info_for_event (self, event);
+ info = get_app_info_for_event (self, &event->button);
if (info == NULL)
return FALSE;
@@ -258,11 +258,9 @@ widget_button_press_event_cb (GtkWidget *widget,
if (n_children > 0)
/* actually popup the menu */
gtk_menu_popup_with_params (GTK_MENU (menu),
+ event,
NULL,
NULL,
- NULL,
- event->button,
- event->time,
TRUE,
GDK_WINDOW_TYPE_HINT_POPUP_MENU,
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]