Use a weak reference instead of ref()/unref(). (#60857, reported by Joshua

Tue Feb  3 00:14:36 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gdk/x11/gdkgeometry-x11.c (queue_item_free, gdk_window_queue):
	Use a weak reference instead of ref()/unref(). (#60857, reported
	by Joshua N Pritikin)

	* gdk/gdkimage.c (scratch_image_info_for_depth): Formatting fix.
This commit is contained in:
Soeren Sandmann 2004-02-02 23:26:55 +00:00 committed by Søren Sandmann Pedersen
parent 4ec8e2b20e
commit 01440e457e
7 changed files with 49 additions and 4 deletions

View File

@ -1,3 +1,11 @@
Tue Feb 3 00:14:36 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/x11/gdkgeometry-x11.c (queue_item_free, gdk_window_queue):
Use a weak reference instead of ref()/unref(). (#60857, reported
by Joshua N Pritikin)
* gdk/gdkimage.c (scratch_image_info_for_depth): Formatting fix.
Tue Feb 3 00:15:17 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): Add

View File

@ -1,3 +1,11 @@
Tue Feb 3 00:14:36 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/x11/gdkgeometry-x11.c (queue_item_free, gdk_window_queue):
Use a weak reference instead of ref()/unref(). (#60857, reported
by Joshua N Pritikin)
* gdk/gdkimage.c (scratch_image_info_for_depth): Formatting fix.
Tue Feb 3 00:15:17 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): Add

View File

@ -1,3 +1,11 @@
Tue Feb 3 00:14:36 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/x11/gdkgeometry-x11.c (queue_item_free, gdk_window_queue):
Use a weak reference instead of ref()/unref(). (#60857, reported
by Joshua N Pritikin)
* gdk/gdkimage.c (scratch_image_info_for_depth): Formatting fix.
Tue Feb 3 00:15:17 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): Add

View File

@ -1,3 +1,11 @@
Tue Feb 3 00:14:36 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/x11/gdkgeometry-x11.c (queue_item_free, gdk_window_queue):
Use a weak reference instead of ref()/unref(). (#60857, reported
by Joshua N Pritikin)
* gdk/gdkimage.c (scratch_image_info_for_depth): Formatting fix.
Tue Feb 3 00:15:17 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): Add

View File

@ -1,3 +1,11 @@
Tue Feb 3 00:14:36 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* gdk/x11/gdkgeometry-x11.c (queue_item_free, gdk_window_queue):
Use a weak reference instead of ref()/unref(). (#60857, reported
by Joshua N Pritikin)
* gdk/gdkimage.c (scratch_image_info_for_depth): Formatting fix.
Tue Feb 3 00:15:17 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): Add

View File

@ -247,7 +247,7 @@ scratch_image_info_for_depth (GdkScreen *screen,
image_info->depth = depth;
image_info->screen = screen;
/* Try to allocate as few possible shared images */
/* Try to allocate as few possible shared images */
for (i=0; i < G_N_ELEMENTS (possible_n_images); i++)
{
if (allocate_scratch_images (image_info, possible_n_images[i], TRUE))

View File

@ -914,7 +914,11 @@ queue_delete_link (GQueue *queue,
static void
queue_item_free (GdkWindowQueueItem *item)
{
g_object_unref (item->window);
if (item->window)
{
g_object_remove_weak_pointer (G_OBJECT (item->window),
(gpointer *)&(item->window));
}
if (item->type == GDK_WINDOW_QUEUE_ANTIEXPOSE)
gdk_region_destroy (item->u.antiexpose.area);
@ -979,12 +983,13 @@ gdk_window_queue (GdkWindow *window,
tmp_list = next;
}
}
g_object_ref (window);
item->window = window;
item->serial = NextRequest (GDK_WINDOW_XDISPLAY (window));
g_object_add_weak_pointer (G_OBJECT (window),
(gpointer *)&(item->window));
g_queue_push_tail (display_x11->translate_queue, item);
}