fix X serial handling to cope with wraparounds and maintain referential

Thu Aug 23 15:32:09 2007  Tim Janik  <timj@imendio.com>

	* gdk/x11/gdkgeometry-x11.c (_gdk_window_process_expose): fix
	X serial handling to cope with wraparounds and maintain referential
	integrity when removing list nodes. based on a patch by Hui Wang,
	fixes #461648.

svn path=/trunk/; revision=18693
This commit is contained in:
Tim Janik 2007-08-28 15:26:23 +00:00 committed by Mathias Hasselmann
parent bf4b559a31
commit 592dc62de8
2 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,10 @@
Thu Aug 23 15:32:09 2007 Tim Janik <timj@imendio.com>
* gdk/x11/gdkgeometry-x11.c (_gdk_window_process_expose): fix
X serial handling to cope with wraparounds and maintain referential
integrity when removing list nodes. based on a patch by Hui Wang,
fixes #461648.
2007-08-27 Stefan Kost <ensonic@users.sf.net>
* gtk/gtkwindow.c: Update menu accelerators, when adding/removing

View File

@ -1052,7 +1052,7 @@ gdk_window_queue (GdkWindow *window,
GdkWindowQueueItem *item = tmp_list->data;
GList *next = tmp_list->next;
if (serial > item->serial)
if (serial - item->serial < 0x7FFFFFFF)
{
queue_delete_link (display_x11->translate_queue, tmp_list);
queue_item_free (item);
@ -1142,9 +1142,7 @@ _gdk_window_process_expose (GdkWindow *window,
while (tmp_list)
{
GdkWindowQueueItem *item = tmp_list->data;
tmp_list = tmp_list->next;
if (serial < item->serial)
if (item->serial - serial < 0x7FFFFFFF)
{
if (item->window == window)
{
@ -1172,10 +1170,10 @@ _gdk_window_process_expose (GdkWindow *window,
}
else
{
queue_delete_link (display_x11->translate_queue,
display_x11->translate_queue->head);
queue_delete_link (display_x11->translate_queue, tmp_list);
queue_item_free (item);
}
tmp_list = tmp_list->next;
}
}