gtk+ r19935 - in branches/gtk-2-12: . gdk/quartz
- From: rhult svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r19935 - in branches/gtk-2-12: . gdk/quartz
- Date: Tue, 25 Mar 2008 13:56:46 +0000 (GMT)
Author: rhult
Date: Tue Mar 25 13:56:46 2008
New Revision: 19935
URL: http://svn.gnome.org/viewvc/gtk+?rev=19935&view=rev
Log:
2008-03-25 Richard Hult <richard imendio com>
Merged from trunk:
* gdk/quartz/gdkwindow-quartz.c:
(gdk_window_quartz_process_all_updates): Plug a leak and add a
check that we have a toplevel before accessing it.
2008-03-25 Richard Hult <richard imendio com>
Merged from trunk:
* gdk/quartz/gdkwindow-quartz.c:
(gdk_window_quartz_process_all_updates): Patch from Paul Davis,
only flush the toplevel once per update.
Modified:
branches/gtk-2-12/ChangeLog
branches/gtk-2-12/gdk/quartz/gdkwindow-quartz.c
Modified: branches/gtk-2-12/gdk/quartz/gdkwindow-quartz.c
==============================================================================
--- branches/gtk-2-12/gdk/quartz/gdkwindow-quartz.c (original)
+++ branches/gtk-2-12/gdk/quartz/gdkwindow-quartz.c Tue Mar 25 13:56:46 2008
@@ -319,9 +319,11 @@
{
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);
@@ -329,15 +331,49 @@
while (tmp_list)
{
+ GdkWindow *window = tmp_list->data;
+ GdkWindow *toplevel;
+
+ /* Only flush each toplevel at most once. */
+ toplevel = gdk_window_get_toplevel (window);
+ if (toplevel)
+ {
+ GdkWindowObject *private;
+ GdkWindowImplQuartz *impl;
+ NSWindow *nswindow;
+
+ 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;
}
+ tmp_list = nswindows;
+ while (tmp_list)
+ {
+ NSWindow *nswindow = tmp_list->data;
+
+ [nswindow enableFlushWindow];
+ [nswindow flushWindow];
+
+ tmp_list = tmp_list->next;
+ }
+
GDK_QUARTZ_RELEASE_POOL;
g_slist_free (old_update_windows);
+ g_slist_free (nswindows);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]