summaryrefslogtreecommitdiff
path: root/gdk/quartz
diff options
context:
space:
mode:
authorRichard Hult <richard@imendio.com>2008-03-14 10:20:55 +0000
committerRichard Hult <rhult@src.gnome.org>2008-03-14 10:20:55 +0000
commit1438c5623ba561fdfbe16dc933b48cf71927125a (patch)
treed43afb7b9a2157ae097d6315289d20685307b25a /gdk/quartz
parent5ed9d8099c62927a790f21667d605d28c9164c7e (diff)
downloadgtk+-1438c5623ba561fdfbe16dc933b48cf71927125a.tar.gz
Patch from Paul Davis, only flush the toplevel once per update.
2008-03-14 Richard Hult <richard@imendio.com> * gdk/quartz/gdkwindow-quartz.c: (gdk_window_quartz_process_all_updates): Patch from Paul Davis, only flush the toplevel once per update. svn path=/trunk/; revision=19871
Diffstat (limited to 'gdk/quartz')
-rw-r--r--gdk/quartz/gdkwindow-quartz.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index ed385aa4bb..b72097e940 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -333,9 +333,11 @@ gdk_window_quartz_process_all_updates (void)
{
GSList *old_update_windows = update_windows;
GSList *tmp_list = update_windows;
+ GSList *nswindows;
update_idle = 0;
update_windows = NULL;
+ nswindows = NULL;
g_slist_foreach (old_update_windows, (GFunc) g_object_ref, NULL);
@@ -343,15 +345,43 @@ gdk_window_quartz_process_all_updates (void)
while (tmp_list)
{
+ GdkWindow *window = tmp_list->data;
+ GdkWindow *toplevel;
+ NSWindow *nswindow;
+ GdkWindowObject *private;
+ GdkWindowImplQuartz *impl;
+
+ toplevel = gdk_window_get_toplevel (window);
+ private = (GdkWindowObject *) toplevel;
+ impl = (GdkWindowImplQuartz *) private->impl;
+ nswindow = impl->toplevel;
+
+ if (nswindow && ![nswindow isFlushWindowDisabled])
+ {
+ [nswindow disableFlushWindow];
+ nswindows = g_slist_prepend (nswindows, nswindow);
+ }
+
gdk_window_quartz_process_updates_internal (tmp_list->data);
g_object_unref (tmp_list->data);
tmp_list = tmp_list->next;
}
+ while (nswindows)
+ {
+ NSWindow *nswindow = nswindows->data;
+
+ [nswindow enableFlushWindow];
+ [nswindow flushWindow];
+
+ nswindows = nswindows->next;
+ }
+
GDK_QUARTZ_RELEASE_POOL;
g_slist_free (old_update_windows);
+ g_slist_free (nswindows);
}
static gboolean