summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ralls <jralls@ceridwen.us>2023-03-25 13:41:08 -0700
committerJohn Ralls <jralls@ceridwen.us>2023-03-25 13:41:08 -0700
commitf2c8b8b0d2d1abc8e40eee2518a3bcd5dcc76aec (patch)
tree4d6e2f9b3ff8c1aae28f4d008eb70141919fe93a
parent007299ccc868e155911c1600217184a81a4de3f1 (diff)
parent33fd9eb472212014d42df5b8ec633184002c0dda (diff)
downloadgtk+-f2c8b8b0d2d1abc8e40eee2518a3bcd5dcc76aec.tar.gz
Merge branch 'issue5593' into gtk-3-24
-rw-r--r--gdk/quartz/gdkdisplay-quartz.c15
-rw-r--r--gdk/quartz/gdkdisplay-quartz.h2
-rw-r--r--gdk/quartz/gdkwindow-quartz.h2
3 files changed, 12 insertions, 7 deletions
diff --git a/gdk/quartz/gdkdisplay-quartz.c b/gdk/quartz/gdkdisplay-quartz.c
index 53726e38b6..3ace0170be 100644
--- a/gdk/quartz/gdkdisplay-quartz.c
+++ b/gdk/quartz/gdkdisplay-quartz.c
@@ -96,7 +96,6 @@ _gdk_quartz_display_add_frame_callback (GdkDisplay *display,
display_quartz = GDK_QUARTZ_DISPLAY (display);
impl->frame_link.data = window;
- impl->frame_link.prev = NULL;
impl->frame_link.next = display_quartz->windows_awaiting_frame;
display_quartz->windows_awaiting_frame = &impl->frame_link;
@@ -110,14 +109,14 @@ _gdk_quartz_display_remove_frame_callback (GdkDisplay *display,
GdkWindow *window)
{
GdkQuartzDisplay *display_quartz = GDK_QUARTZ_DISPLAY (display);
- GList *link;
+ GSList *link;
- link = g_list_find (display_quartz->windows_awaiting_frame, window);
+ link = g_slist_find (display_quartz->windows_awaiting_frame, window);
if (link != NULL)
{
display_quartz->windows_awaiting_frame =
- g_list_remove_link (display_quartz->windows_awaiting_frame, link);
+ g_slist_remove_link (display_quartz->windows_awaiting_frame, link);
}
if (display_quartz->windows_awaiting_frame == NULL)
@@ -129,7 +128,7 @@ gdk_quartz_display_frame_cb (gpointer data)
{
GdkDisplayLinkSource *source;
GdkQuartzDisplay *display_quartz = data;
- GList *iter;
+ GSList *iter, **last_next = NULL;
gint64 presentation_time;
gint64 now;
@@ -154,6 +153,12 @@ gdk_quartz_display_frame_cb (gpointer data)
GdkFrameClock *frame_clock = gdk_window_get_frame_clock (window);
GdkFrameTimings *timings;
+ /* Clear the frame_link */
+ iter->data = NULL;
+ if (last_next && *last_next)
+ *last_next = NULL;
+ last_next = &iter->next;
+
if (frame_clock == NULL)
continue;
diff --git a/gdk/quartz/gdkdisplay-quartz.h b/gdk/quartz/gdkdisplay-quartz.h
index 59245da7ca..dbe8f67e97 100644
--- a/gdk/quartz/gdkdisplay-quartz.h
+++ b/gdk/quartz/gdkdisplay-quartz.h
@@ -39,7 +39,7 @@ struct _GdkQuartzDisplay
GPtrArray *monitors;
/* This structure is not allocated. It points to an embedded
* GList in the GdkWindow. */
- GList *windows_awaiting_frame;
+ GSList *windows_awaiting_frame;
GSource *frame_source;
};
diff --git a/gdk/quartz/gdkwindow-quartz.h b/gdk/quartz/gdkwindow-quartz.h
index de9a5ebccf..7551e9be67 100644
--- a/gdk/quartz/gdkwindow-quartz.h
+++ b/gdk/quartz/gdkwindow-quartz.h
@@ -66,7 +66,7 @@ struct _GdkWindowImplQuartz
gint shadow_max;
gboolean use_cg_context;
- GList frame_link;
+ GSList frame_link;
gint pending_frame_counter;
};