x11: fix endless loop looking up drag contexts
Backported from GTK 3 commit f77b690e26 by Edward Sheldrake.
This commit is contained in:
parent
c98c537dbc
commit
3beab3b115
1 changed files with 2 additions and 4 deletions
|
|
@ -263,12 +263,12 @@ gdk_drag_context_find (GdkDisplay *display,
|
|||
Window source_xid,
|
||||
Window dest_xid)
|
||||
{
|
||||
GList *tmp_list = contexts;
|
||||
GList *tmp_list;
|
||||
GdkDragContext *context;
|
||||
GdkDragContextPrivateX11 *private;
|
||||
Window context_dest_xid;
|
||||
|
||||
while (tmp_list)
|
||||
for (tmp_list = contexts; tmp_list; tmp_list = tmp_list->next)
|
||||
{
|
||||
context = (GdkDragContext *)tmp_list->data;
|
||||
private = PRIVATE_DATA (context);
|
||||
|
|
@ -288,8 +288,6 @@ gdk_drag_context_find (GdkDisplay *display,
|
|||
(GDK_DRAWABLE_XID (context->source_window) == source_xid))) &&
|
||||
((dest_xid == None) || (context_dest_xid == dest_xid)))
|
||||
return context;
|
||||
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue