[gtk+] gdk/x11: s/gdk_event_free/g_object_unref/



commit 3021edc38d0dfe88f8e01f49e057dc1c4b212e4e
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Oct 31 13:35:11 2017 +0100

    gdk/x11: s/gdk_event_free/g_object_unref/

 gdk/x11/gdkdevicemanager-core-x11.c |    2 +-
 gdk/x11/gdkdnd-x11.c                |    8 ++++----
 gdk/x11/gdkeventsource.c            |   10 +++++-----
 3 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-core-x11.c b/gdk/x11/gdkdevicemanager-core-x11.c
index 27dfa1b..c4425d5 100644
--- a/gdk/x11/gdkdevicemanager-core-x11.c
+++ b/gdk/x11/gdkdevicemanager-core-x11.c
@@ -897,7 +897,7 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
         gdk_event_set_source_device (event, source_device);
 
       gdk_display_put_event (gdk_window_get_display (window), event);
-      gdk_event_free (event);
+      g_object_unref (event);
     }
 }
 
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index 367eaa6..369d928 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -1259,7 +1259,7 @@ send_client_message_async_cb (Window   window,
 
       gdk_display_put_event (gdk_drag_context_get_display (context), temp_event);
 
-      gdk_event_free (temp_event);
+      g_object_unref (temp_event);
     }
 
   g_object_unref (context);
@@ -1312,7 +1312,7 @@ xdnd_send_xevent (GdkX11DragContext *context_x11,
               if ((*xdnd_filters[i].func) (event_send, temp_event, NULL) == GDK_FILTER_TRANSLATE)
                 gdk_display_put_event (display, temp_event);
 
-              gdk_event_free (temp_event);
+              g_object_unref (temp_event);
 
               return TRUE;
             }
@@ -2362,7 +2362,7 @@ gdk_x11_drag_context_drag_motion (GdkDragContext *context,
       gdk_event_set_device (temp_event, gdk_drag_context_get_device (context));
 
       gdk_display_put_event (gdk_drag_context_get_display (context), temp_event);
-      gdk_event_free (temp_event);
+      g_object_unref (temp_event);
     }
   else
     {
@@ -2407,7 +2407,7 @@ gdk_x11_drag_context_drag_motion (GdkDragContext *context,
                 gdk_event_set_device (temp_event, gdk_drag_context_get_device (context));
 
                 gdk_display_put_event (gdk_drag_context_get_display (context), temp_event);
-                gdk_event_free (temp_event);
+                g_object_unref (temp_event);
               }
               break;
             case GDK_DRAG_PROTO_MOTIF:
diff --git a/gdk/x11/gdkeventsource.c b/gdk/x11/gdkeventsource.c
index 3d2917f..0e666ac 100644
--- a/gdk/x11/gdkeventsource.c
+++ b/gdk/x11/gdkeventsource.c
@@ -165,7 +165,7 @@ handle_focus_change (GdkEventCrossing *event)
       gdk_event_set_device (focus_event, gdk_event_get_device ((GdkEvent *) event));
 
       gdk_display_put_event (gdk_window_get_display (event->any.window), focus_event);
-      gdk_event_free (focus_event);
+      g_object_unref (focus_event);
     }
 }
 
@@ -259,7 +259,7 @@ handle_touch_synthetic_crossing (GdkEvent *event)
   if (crossing)
     {
       gdk_display_put_event (gdk_device_get_display (device), crossing);
-      gdk_event_free (crossing);
+      g_object_unref (crossing);
     }
 }
 
@@ -324,14 +324,14 @@ gdk_event_source_translate_event (GdkX11Display  *x11_display,
     {
       if (result == GDK_FILTER_REMOVE)
         {
-          gdk_event_free (event);
+          g_object_unref (event);
           return NULL;
         }
       else /* GDK_FILTER_TRANSLATE */
         return event;
     }
 
-  gdk_event_free (event);
+  g_object_unref (event);
   event = NULL;
 
   if (event_translator)
@@ -499,7 +499,7 @@ gdk_event_source_dispatch (GSource     *source,
     {
       _gdk_event_emit (event);
 
-      gdk_event_free (event);
+      g_object_unref (event);
     }
 
   gdk_threads_leave ();


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