[gtk+/wip/dboles/combobox-events: 3/3] combobox—Always popup menu using current event



commit de5ce5520c4f69aaab27d500cb77c726f2fa15b3
Author: Daniel Boles <dboles src gnome org>
Date:   Thu Feb 16 20:59:54 2017 +0000

    combobox—Always popup menu using current event
    
    The only time the passed-in trigger_event could be non-NULL, meaning we
    might be using another event, was in the now-removed handler for our
    ToggleButton’s button-press-event.

 gtk/gtkcombobox.c |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index ab619a4..a096087 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -292,8 +292,7 @@ static void     gtk_combo_box_update_sensitivity   (GtkComboBox      *combo_box)
 static gboolean gtk_combo_box_menu_key_press       (GtkWidget        *widget,
                                                     GdkEventKey      *event,
                                                     gpointer          data);
-static void     gtk_combo_box_menu_popup           (GtkComboBox      *combo_box,
-                                                    const GdkEvent   *trigger_event);
+static void     gtk_combo_box_menu_popup           (GtkComboBox      *combo_box);
 
 /* cell layout */
 static GtkCellArea *gtk_combo_box_cell_layout_get_area       (GtkCellLayout    *cell_layout);
@@ -1474,8 +1473,7 @@ update_menu_sensitivity (GtkComboBox *combo_box,
 }
 
 static void
-gtk_combo_box_menu_popup (GtkComboBox    *combo_box,
-                          const GdkEvent *trigger_event)
+gtk_combo_box_menu_popup (GtkComboBox    *combo_box)
 {
   GtkComboBoxPrivate *priv = combo_box->priv;
   gint active_item;
@@ -1537,7 +1535,7 @@ gtk_combo_box_menu_popup (GtkComboBox    *combo_box,
                                 gtk_bin_get_child (GTK_BIN (combo_box)),
                                 GDK_GRAVITY_SOUTH_WEST,
                                 GDK_GRAVITY_NORTH_WEST,
-                                trigger_event);
+                                NULL);
     }
   else
     {
@@ -1593,7 +1591,7 @@ gtk_combo_box_menu_popup (GtkComboBox    *combo_box,
                                 GTK_WIDGET (combo_box),
                                 GDK_GRAVITY_WEST,
                                 GDK_GRAVITY_NORTH_WEST,
-                                trigger_event);
+                                NULL);
     }
 
     /* Re-get the active item before selecting it, as a popped-up handler – like
@@ -1659,7 +1657,7 @@ gtk_combo_box_popup_for_device (GtkComboBox *combo_box,
   if (gtk_widget_get_mapped (priv->popup_widget))
     return;
 
-  gtk_combo_box_menu_popup (combo_box, priv->trigger_event);
+  gtk_combo_box_menu_popup (combo_box);
 }
 
 static void
@@ -1667,7 +1665,7 @@ gtk_combo_box_real_popup (GtkComboBox *combo_box)
 {
   GtkComboBoxPrivate *priv = combo_box->priv;
 
-  gtk_combo_box_menu_popup (combo_box, priv->trigger_event);
+  gtk_combo_box_menu_popup (combo_box);
 }
 
 static gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]