[gtk+/wip/carlosg/event-as-object: 18/23] gdk/x11: s/gdk_event_free/g_object_unref/



commit 69e5df853bcbade487a12d75fc529005dd66433d
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 67e9289..ab6df1c 100644
--- a/gdk/x11/gdkdevicemanager-core-x11.c
+++ b/gdk/x11/gdkdevicemanager-core-x11.c
@@ -900,7 +900,7 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
         gdk_event_set_source_device (event, source_device);
 
       gdk_event_put (event);
-      gdk_event_free (event);
+      g_object_unref (event);
     }
 }
 
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index b5352b8..0e4135a 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -1155,7 +1155,7 @@ send_client_message_async_cb (Window   window,
 
       gdk_event_put (temp_event);
 
-      gdk_event_free (temp_event);
+      g_object_unref (temp_event);
     }
 
   g_object_unref (context);
@@ -1221,7 +1221,7 @@ xdnd_send_xevent (GdkX11DragContext *context_x11,
               if ((*xdnd_filters[i].func) (event_send, temp_event, NULL) == GDK_FILTER_TRANSLATE)
                 gdk_event_put (temp_event);
 
-              gdk_event_free (temp_event);
+              g_object_unref (temp_event);
 
               return TRUE;
             }
@@ -2317,7 +2317,7 @@ gdk_x11_drag_context_drag_motion (GdkDragContext *context,
       gdk_event_set_device (temp_event, gdk_drag_context_get_device (context));
 
       gdk_event_put (temp_event);
-      gdk_event_free (temp_event);
+      g_object_unref (temp_event);
     }
   else
     {
@@ -2367,7 +2367,7 @@ gdk_x11_drag_context_drag_motion (GdkDragContext *context,
                 gdk_event_set_device (temp_event, gdk_drag_context_get_device (context));
 
                 gdk_event_put (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 f404cc0..e693d41 100644
--- a/gdk/x11/gdkeventsource.c
+++ b/gdk/x11/gdkeventsource.c
@@ -164,7 +164,7 @@ handle_focus_change (GdkEventCrossing *event)
       gdk_event_set_device (focus_event, gdk_event_get_device ((GdkEvent *) event));
 
       gdk_event_put (focus_event);
-      gdk_event_free (focus_event);
+      g_object_unref (focus_event);
     }
 }
 
@@ -258,7 +258,7 @@ handle_touch_synthetic_crossing (GdkEvent *event)
   if (crossing)
     {
       gdk_event_put (crossing);
-      gdk_event_free (crossing);
+      g_object_unref (crossing);
     }
 }
 
@@ -310,14 +310,14 @@ gdk_event_source_translate_event (GdkEventSource *event_source,
 
       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)
@@ -472,7 +472,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]