summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2023-03-03 06:33:36 -0500
committerMatthias Clasen <mclasen@redhat.com>2023-03-14 14:56:42 -0400
commit15d73a1adbec6c77878d6b18583130356b3b19b6 (patch)
tree0fa2cc61e9cf2236a5cd436e70e35cb20af58603
parent6f93baf42057ae211f5283ee78fb56a663f4acd2 (diff)
downloadgtk+-15d73a1adbec6c77878d6b18583130356b3b19b6.tar.gz
macos: Stop using g_slice
-rw-r--r--gdk/macos/gdkmacosdisplay.c4
-rw-r--r--gdk/macos/gdkmacosdrag.c4
-rw-r--r--gdk/macos/gdkmacospasteboard.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/gdk/macos/gdkmacosdisplay.c b/gdk/macos/gdkmacosdisplay.c
index b9869fae7c..0d9791a5d4 100644
--- a/gdk/macos/gdkmacosdisplay.c
+++ b/gdk/macos/gdkmacosdisplay.c
@@ -283,7 +283,7 @@ static void
push_nsevent (GdkEvent *gdk_event,
NSEvent *nsevent)
{
- GdkToNSEventMap *map = g_slice_new0 (GdkToNSEventMap);
+ GdkToNSEventMap *map = g_new0 (GdkToNSEventMap, 1);
map->link.data = map;
map->gdk_event = gdk_event_ref (gdk_event);
@@ -297,7 +297,7 @@ push_nsevent (GdkEvent *gdk_event,
gdk_event_unref (map->gdk_event);
[map->nsevent release];
- g_slice_free (GdkToNSEventMap, map);
+ g_free (map);
}
}
diff --git a/gdk/macos/gdkmacosdrag.c b/gdk/macos/gdkmacosdrag.c
index c0201df067..370d0d0044 100644
--- a/gdk/macos/gdkmacosdrag.c
+++ b/gdk/macos/gdkmacosdrag.c
@@ -66,7 +66,7 @@ gdk_macos_zoomback_destroy (GdkMacosZoomback *zb)
{
gdk_surface_hide (GDK_SURFACE (zb->drag->drag_surface));
g_clear_object (&zb->drag);
- g_slice_free (GdkMacosZoomback, zb);
+ g_free (zb);
}
static gboolean
@@ -157,7 +157,7 @@ gdk_macos_drag_drop_done (GdkDrag *drag,
/* Apple HIG suggests doing a "zoomback" animation of the surface back
* towards the original position.
*/
- zb = g_slice_new0 (GdkMacosZoomback);
+ zb = g_new0 (GdkMacosZoomback, 1);
zb->drag = g_object_ref (self);
zb->frame_clock = gdk_surface_get_frame_clock (GDK_SURFACE (self->drag_surface));
zb->start_time = gdk_frame_clock_get_frame_time (zb->frame_clock);
diff --git a/gdk/macos/gdkmacospasteboard.c b/gdk/macos/gdkmacospasteboard.c
index 66b3c9f03b..0903c5352a 100644
--- a/gdk/macos/gdkmacospasteboard.c
+++ b/gdk/macos/gdkmacospasteboard.c
@@ -423,7 +423,7 @@ write_request_free (WriteRequest *wr)
g_clear_pointer (&wr->main_context, g_main_context_unref);
g_clear_object (&wr->stream);
[wr->item release];
- g_slice_free (WriteRequest, wr);
+ g_free (wr);
}
static void
@@ -491,7 +491,7 @@ on_data_ready_cb (GObject *object,
return;
}
- wr = g_slice_new0 (WriteRequest);
+ wr = g_new0 (WriteRequest, 1);
wr->item = [item retain];
wr->stream = G_MEMORY_OUTPUT_STREAM (g_memory_output_stream_new_resizable ());
wr->type = type;