[gtk/dnd-gestures-2: 77/175] Stop passing timestamps around



commit 0399f425e9c814ad5a670f2ec73036f6de76b3a4
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jan 5 20:31:12 2020 -0500

    Stop passing timestamps around
    
    We were not using these in a useful way in the end,
    so stop passing them around.

 gtk/gtkdnd.c             | 38 +++++++++++++-------------------------
 gtk/gtkdragdest.c        |  3 +--
 gtk/gtkdragdestprivate.h |  3 +--
 3 files changed, 15 insertions(+), 29 deletions(-)
---
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index d11d94928a..d74c5212ae 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -76,8 +76,7 @@ struct _GtkDragDestInfo
 typedef gboolean (* GtkDragDestCallback) (GtkWidget      *widget,
                                           GdkDrop        *drop,
                                           gint            x,
-                                          gint            y,
-                                          guint32         time);
+                                          gint            y);
 
 /* Forward declarations */
 static gboolean gtk_drop_find_widget            (GtkWidget        *widget,
@@ -85,21 +84,17 @@ static gboolean gtk_drop_find_widget            (GtkWidget        *widget,
                                                  GtkDragDestInfo  *info,
                                                  gint              x,
                                                  gint              y,
-                                                 guint32           time,
                                                  GtkDragDestCallback callback);
 static void     gtk_drag_dest_leave             (GtkWidget        *widget,
-                                                 GdkDrop          *drop,
-                                                 guint             time);
+                                                 GdkDrop          *drop);
 static gboolean gtk_drag_dest_motion            (GtkWidget        *widget,
                                                  GdkDrop          *drop,
                                                  gint              x,
-                                                 gint              y,
-                                                 guint             time);
+                                                 gint              y);
 static gboolean gtk_drag_dest_drop              (GtkWidget        *widget,
                                                  GdkDrop          *drop,
                                                  gint              x,
-                                                 gint              y,
-                                                 guint             time);
+                                                 gint              y);
 static void     gtk_drag_dest_set_widget        (GtkDragDestInfo  *info,
                                                  GtkWidget        *widget);
 
@@ -121,7 +116,6 @@ _gtk_drag_dest_handle_event (GtkWidget *toplevel,
 {
   GtkDragDestInfo *info;
   GdkDrop *drop;
-  guint32 time;
   GdkEventType event_type;
 
   g_return_if_fail (toplevel != NULL);
@@ -129,7 +123,6 @@ _gtk_drag_dest_handle_event (GtkWidget *toplevel,
 
   event_type = gdk_event_get_event_type (event);
   drop = gdk_event_get_drop (event);
-  time = gdk_event_get_time (event);
 
   info = gtk_drag_get_dest_info (drop, TRUE);
 
@@ -142,7 +135,7 @@ _gtk_drag_dest_handle_event (GtkWidget *toplevel,
     case GDK_DRAG_LEAVE:
       if (info->widget)
         {
-          gtk_drag_dest_leave (info->widget, drop, time);
+          gtk_drag_dest_leave (info->widget, drop);
           gtk_drag_dest_set_widget (info, NULL);
         }
       break;
@@ -160,7 +153,7 @@ _gtk_drag_dest_handle_event (GtkWidget *toplevel,
              */
             if (info->widget)
               {
-                gtk_drag_dest_leave (info->widget, drop, time);
+                gtk_drag_dest_leave (info->widget, drop);
                 gtk_drag_dest_set_widget (info, NULL);
               }
           }
@@ -172,14 +165,13 @@ _gtk_drag_dest_handle_event (GtkWidget *toplevel,
                                       info,
                                       x,
                                       y,
-                                      time,
                                       (event_type == GDK_DRAG_MOTION) ?
                                       gtk_drag_dest_motion :
                                       gtk_drag_dest_drop);
 
         if (info->widget && !found)
           {
-            gtk_drag_dest_leave (info->widget, drop, time);
+            gtk_drag_dest_leave (info->widget, drop);
             gtk_drag_dest_set_widget (info, NULL);
           }
         
@@ -201,7 +193,6 @@ gtk_drop_find_widget (GtkWidget           *event_widget,
                       GtkDragDestInfo     *info,
                       gint                 x,
                       gint                 y,
-                      guint32              time,
                       GtkDragDestCallback  callback)
 {
   GtkWidget *widget;
@@ -248,13 +239,13 @@ gtk_drop_find_widget (GtkWidget           *event_widget,
        */
       if (g_object_get_data (G_OBJECT (widget), "gtk-drag-dest"))
         {
-          found = callback (widget, drop, x, y, time);
+          found = callback (widget, drop, x, y);
 
           /* If so, send a "drag-leave" to the last widget */
           if (found && info->widget != widget)
             {
               if (info->widget)
-                gtk_drag_dest_leave (info->widget, drop, time);
+                gtk_drag_dest_leave (info->widget, drop);
 
               gtk_drag_dest_set_widget (info, widget);
             }
@@ -342,23 +333,21 @@ gtk_drag_get_dest_info (GdkDrop  *drop,
  */
 static void  
 gtk_drag_dest_leave (GtkWidget *widget,
-                     GdkDrop   *drop,
-                     guint      time)
+                     GdkDrop   *drop)
 {
   GtkDropTarget *dest;
 
   dest = gtk_drop_target_get (widget);
   g_return_if_fail (dest != NULL);
 
-  gtk_drop_target_emit_drag_leave (dest, drop, time);
+  gtk_drop_target_emit_drag_leave (dest, drop);
 }
 
 static gboolean
 gtk_drag_dest_motion (GtkWidget *widget,
                       GdkDrop   *drop,
                       gint       x,
-                      gint       y,
-                      guint      time)
+                      gint       y)
 {
   GtkDropTarget *dest;
 
@@ -372,8 +361,7 @@ static gboolean
 gtk_drag_dest_drop (GtkWidget *widget,
                     GdkDrop   *drop,
                     gint       x,
-                    gint       y,
-                    guint      time)
+                    gint       y)
 {
   GtkDropTarget *dest;
 
diff --git a/gtk/gtkdragdest.c b/gtk/gtkdragdest.c
index 62d2647a85..4ad84fbe2f 100644
--- a/gtk/gtkdragdest.c
+++ b/gtk/gtkdragdest.c
@@ -605,8 +605,7 @@ set_drop (GtkDropTarget *dest,
 
 void
 gtk_drop_target_emit_drag_leave (GtkDropTarget    *dest,
-                                 GdkDrop          *drop,
-                                 guint             time)
+                                 GdkDrop          *drop)
 {
   set_drop (dest, drop);
   g_signal_emit (dest, signals[DRAG_LEAVE], 0, time);
diff --git a/gtk/gtkdragdestprivate.h b/gtk/gtkdragdestprivate.h
index 6341ac579a..cb1c031208 100644
--- a/gtk/gtkdragdestprivate.h
+++ b/gtk/gtkdragdestprivate.h
@@ -27,8 +27,7 @@ void gtk_drop_target_emit_drag_data_received (GtkDropTarget    *dest,
                                               GdkDrop          *drop,
                                               GtkSelectionData *sdata);
 void gtk_drop_target_emit_drag_leave         (GtkDropTarget    *dest,
-                                              GdkDrop          *drop,
-                                              guint             time);
+                                              GdkDrop          *drop);
 gboolean gtk_drop_target_emit_drag_motion    (GtkDropTarget    *dest,
                                               GdkDrop          *drop,
                                               int               x,


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