[gtk/listview-for-merge: 2/181] eventcontrollermotion: Remove mode argument



commit 6afd92d54727881b968679706c726558d00980f4
Author: Benjamin Otte <otte redhat com>
Date:   Sun May 24 17:47:53 2020 +0200

    eventcontrollermotion: Remove mode argument
    
    It's not used and nobody has documented how it's meant to work anyway.

 gtk/gtkeventcontrollermotion.c | 14 +++++---------
 gtk/gtkiconview.c              |  6 ++----
 gtk/gtklabel.c                 |  2 --
 gtk/gtkpopovermenu.c           |  3 +--
 gtk/gtkpopovermenubar.c        |  2 --
 gtk/gtkscrolledwindow.c        |  1 -
 gtk/gtktreepopover.c           |  1 -
 gtk/gtktreeview.c              |  4 ----
 8 files changed, 8 insertions(+), 25 deletions(-)
---
diff --git a/gtk/gtkeventcontrollermotion.c b/gtk/gtkeventcontrollermotion.c
index 180c5cebeb..ba725bd02b 100644
--- a/gtk/gtkeventcontrollermotion.c
+++ b/gtk/gtkeventcontrollermotion.c
@@ -127,7 +127,7 @@ update_pointer_focus (GtkEventController    *controller,
     }
 
   if (leave)
-    g_signal_emit (controller, signals[LEAVE], 0, crossing->mode);
+    g_signal_emit (controller, signals[LEAVE], 0);
 
   g_object_freeze_notify (G_OBJECT (motion));
   if (motion->is_pointer != is_pointer)
@@ -143,7 +143,7 @@ update_pointer_focus (GtkEventController    *controller,
   g_object_thaw_notify (G_OBJECT (motion));
 
   if (enter)
-    g_signal_emit (controller, signals[ENTER], 0, x, y, crossing->mode);
+    g_signal_emit (controller, signals[ENTER], 0, x, y);
 }
 
 static void
@@ -232,7 +232,6 @@ gtk_event_controller_motion_class_init (GtkEventControllerMotionClass *klass)
    * @controller: the object which received the signal
    * @x: coordinates of pointer location
    * @y: coordinates of pointer location
-   * @mode: crossing mode
    *
    * Signals that the pointer has entered the widget.
    */
@@ -242,15 +241,13 @@ gtk_event_controller_motion_class_init (GtkEventControllerMotionClass *klass)
                   G_SIGNAL_RUN_LAST,
                   0, NULL, NULL,
                   NULL,
-                  G_TYPE_NONE, 3,
+                  G_TYPE_NONE, 2,
                   G_TYPE_DOUBLE,
-                  G_TYPE_DOUBLE,
-                  GDK_TYPE_CROSSING_MODE);
+                  G_TYPE_DOUBLE);
 
   /**
    * GtkEventControllerMotion::leave:
    * @controller: the object which received the signal
-   * @mode: crossing mode
    *
    * Signals that the pointer has left the widget.
    */
@@ -260,8 +257,7 @@ gtk_event_controller_motion_class_init (GtkEventControllerMotionClass *klass)
                   G_SIGNAL_RUN_LAST,
                   0, NULL, NULL,
                   NULL,
-                  G_TYPE_NONE, 1,
-                  GDK_TYPE_CROSSING_MODE);
+                  G_TYPE_NONE, 0);
 
   /**
    * GtkEventControllerMotion::motion:
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 17a36840af..e907594d2b 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -163,7 +163,6 @@ static void             gtk_icon_view_motion                    (GtkEventControl
                                                                  double              y,
                                                                  gpointer            user_data);
 static void             gtk_icon_view_leave                     (GtkEventController   *controller,
-                                                                 GdkCrossingMode       mode,
                                                                  gpointer              user_data);
 static void             gtk_icon_view_button_press              (GtkGestureClick *gesture,
                                                                  int                   n_press,
@@ -1878,9 +1877,8 @@ gtk_icon_view_motion (GtkEventController *controller,
 }
 
 static void
-gtk_icon_view_leave(GtkEventController   *controller,
-                    GdkCrossingMode       mode,
-                    gpointer              user_data)
+gtk_icon_view_leave (GtkEventController *controller,
+                     gpointer            user_data)
 {
   GtkIconView *icon_view;
   GtkIconViewPrivate *priv;
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index a66581cb48..688c4b3460 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -439,7 +439,6 @@ static void gtk_label_motion            (GtkEventControllerMotion *controller,
                                          double                    y,
                                          gpointer                  data);
 static void gtk_label_leave             (GtkEventControllerMotion *controller,
-                                         GdkCrossingMode           mode,
                                          gpointer                  data);
 
 static gboolean gtk_label_grab_focus        (GtkWidget        *widget);
@@ -4287,7 +4286,6 @@ gtk_label_motion (GtkEventControllerMotion *controller,
 
 static void
 gtk_label_leave (GtkEventControllerMotion *controller,
-                 GdkCrossingMode           mode,
                  gpointer                  data)
 {
   GtkLabel *self = GTK_LABEL (data);
diff --git a/gtk/gtkpopovermenu.c b/gtk/gtkpopovermenu.c
index 718cfe1d58..127683ea3e 100644
--- a/gtk/gtkpopovermenu.c
+++ b/gtk/gtkpopovermenu.c
@@ -242,14 +242,13 @@ focus_out (GtkEventController   *controller,
 
 static void
 leave_cb (GtkEventController   *controller,
-          GdkCrossingMode       mode,
           gpointer              data)
 {
   GtkWidget *target;
 
   target = gtk_event_controller_get_widget (controller);
 
-  if (mode == GDK_CROSSING_NORMAL)
+  if (!gtk_event_controller_motion_contains_pointer (GTK_EVENT_CONTROLLER_MOTION (controller)))
     gtk_popover_menu_set_active_item (GTK_POPOVER_MENU (target), NULL);
 }
 
diff --git a/gtk/gtkpopovermenubar.c b/gtk/gtkpopovermenubar.c
index e563bfa1d4..005fc5e50f 100644
--- a/gtk/gtkpopovermenubar.c
+++ b/gtk/gtkpopovermenubar.c
@@ -169,7 +169,6 @@ static void
 item_enter_cb (GtkEventController   *controller,
                double                x,
                double                y,
-               GdkCrossingMode       mode,
                gpointer              data)
 {
   GtkWidget *target;
@@ -183,7 +182,6 @@ item_enter_cb (GtkEventController   *controller,
 
 static void
 bar_leave_cb (GtkEventController   *controller,
-              GdkCrossingMode       mode,
               gpointer              data)
 {
   GtkWidget *target;
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index ba7eb7338b..00e088cd7e 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -477,7 +477,6 @@ add_tab_bindings (GtkWidgetClass   *widget_class,
 
 static void
 motion_controller_leave (GtkEventController   *controller,
-                         GdkCrossingMode       mode,
                          GtkScrolledWindow    *scrolled_window)
 {
   GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window);
diff --git a/gtk/gtktreepopover.c b/gtk/gtktreepopover.c
index dba7de69e0..232a85d9f8 100644
--- a/gtk/gtktreepopover.c
+++ b/gtk/gtktreepopover.c
@@ -617,7 +617,6 @@ static void
 enter_cb (GtkEventController   *controller,
           double                x,
           double                y,
-          GdkCrossingMode       mode,
           GtkTreePopover       *popover)
 {
   GtkWidget *item;
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 597dc3a3d0..26f05fed9d 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -974,10 +974,8 @@ static void gtk_tree_view_drag_gesture_end                  (GtkGestureDrag *ges
 static void gtk_tree_view_motion_controller_enter           (GtkEventControllerMotion *controller,
                                                              double                    x,
                                                              double                    y,
-                                                             GdkCrossingMode           mode,
                                                              GtkTreeView              *tree_view);
 static void gtk_tree_view_motion_controller_leave           (GtkEventControllerMotion *controller,
-                                                             GdkCrossingMode           mode,
                                                              GtkTreeView              *tree_view);
 static void gtk_tree_view_motion_controller_motion          (GtkEventControllerMotion *controller,
                                                              double                    x,
@@ -5463,7 +5461,6 @@ static void
 gtk_tree_view_motion_controller_enter (GtkEventControllerMotion *controller,
                                        double                    x,
                                        double                    y,
-                                       GdkCrossingMode           mode,
                                        GtkTreeView              *tree_view)
 {
   GtkTreeRBTree *tree;
@@ -5489,7 +5486,6 @@ gtk_tree_view_motion_controller_enter (GtkEventControllerMotion *controller,
 
 static void
 gtk_tree_view_motion_controller_leave (GtkEventControllerMotion *controller,
-                                       GdkCrossingMode           mode,
                                        GtkTreeView              *tree_view)
 {
   if (tree_view->prelight_node)


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