[gtk+/gtk-3-4] GDK X11 DND: Fix infinite loop
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-4] GDK X11 DND: Fix infinite loop
- Date: Tue, 15 May 2012 12:07:22 +0000 (UTC)
commit a3314b5c40300956b660843188711b421a0cd470
Author: Edward Sheldrake <ejsheldrake gmail com>
Date: Mon May 14 13:06:43 2012 +0100
GDK X11 DND: Fix infinite loop
Related: https://bugzilla.gnome.org/show_bug.cgi?id=664646
gdk/x11/gdkdnd-x11.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index 3b6765e..6491f78 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -240,12 +240,12 @@ gdk_drag_context_find (GdkDisplay *display,
Window source_xid,
Window dest_xid)
{
- GList *tmp_list = contexts;
+ GList *tmp_list;
GdkDragContext *context;
GdkX11DragContext *context_x11;
Window context_dest_xid;
- while (tmp_list)
+ for (tmp_list = contexts; tmp_list; tmp_list = tmp_list->next)
{
context = (GdkDragContext *)tmp_list->data;
context_x11 = (GdkX11DragContext *)context;
@@ -265,8 +265,6 @@ gdk_drag_context_find (GdkDisplay *display,
(GDK_WINDOW_XID (context->source_window) == source_xid))) &&
((dest_xid == None) || (context_dest_xid == dest_xid)))
return context;
-
- tmp_list = tmp_list->next;
}
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]