Re: gtk 1.1.[12,13]: motiv and xdnd DND callback order
- From: Owen Taylor <otaylor redhat com>
- To: gtk-devel-list redhat com
- Subject: Re: gtk 1.1.[12,13]: motiv and xdnd DND callback order
- Date: 18 Jan 1999 11:05:21 -0500
Rasca Gmelch <thron@gmx.de> writes:
> i've some problems to understand the order in which the DND
> callbacks are called.
>
> inside a gtk ctree widget i get the following debug output
> from my program:
>
> on_drag_begin()
> on_drag_motion()
> on_drag_data_get()
> on_drag_data()
> on_drag_data_delete()
> on_drag_data_leave()
This is hard to understand because it is a mix of client
side and target side calls. (is on_drag_data()
"drag_data_received" ?) But it looks approximately correct.
> sounds quite good, isn't it?
> in on_drag_data_leave() i reset a value which i need to make
> same visual effects during drag_motion(). but that doesn't work
> during a motiv DND (motiv -> ctree) operation, cause there the
> order is in this way:
>
> on_drag_motion()
> on_drag_leave()
> on_drag_data()
>
> the "drag_data_received" callback is called *after* the leave-callback :(
> is that a bug or a feature or do i have to do special things in
> my code to ensure that the drag_leave comes at the right time??
Basically, I'd say you shouldn't count on the ordering
of "drag_data_received" and "leave".
The two guarantees are:
1a) If you specify GTK_DEST_DEFAULT_DROP in the flags, then
you will get a "drag_data_received" signal if you
receive valid data.
1b) If you don't specify GTK_DEST_DEFAULT_DROP, then you
will always get a "drag_data_received" call when
you call gtk_drag_get_data(), which will either
indicate success or failure.
(Failure by selection_data->length < 0)
2) If you received "drag_motion" events, you will get a
"drag_leave" event.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]