Re: Drag and drop question



Alex Larsson <alexl redhat com> writes:

> I'm having problems with a bug in the framebuffer drag and drop code.
> Since the problem actually is in the generic gtk code, and I'm not very
> good at dnd I need to ask people about this.
> 
> In gtkdnd.c:gtk_drag_get_cursor(), if the value passed for action is
> GDK_ACTION_DEFAULT, the code will eventually call
> gdk_bitmap_create_from_data() with data=NULL. This is because the
> drag_cursors array has bits=0 for the GDK_ACTION_DEFAULT case.
> 
> Passing data==NULL leads to an assertion in the framebuffer code, when
> draging a row in a GtkCList. The X backend never has this problem,
> because it never passes GDK_ACTION_DEFAULT. I believe the reason for the
> difference between the x and the framebuffer code is essentially a race
> condition.
> 
> Anyone know what GDK_ACTION_DEFAULT means? Any ideas on this?

Basically the answer here is that:

 GDK_ACTION_DEFAULT means nothing, it was something that I thought 
 I was going to need, but didn't end up needing.

 The rule for gdk_drag_status() is that you must call it with:
 One of the flags in drag_context->actions or 0, so by this
 rule, the fact that gtkclist calls drag_status() with
 ACTION_DEFAULT is wrong, even if you don't know that you
 aren't supposed to use ACTION_DEFAULT.

Problem doesn't occur in X because GDK_ACTION_DEFAULT isn't
going to make it through the Xdnd protocol. 

Regards,
                                        Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]