Re: [gtk-list] [Gtk] drag & drop restrictions



On Sat, 11 Oct 1997, Thomas NOEL wrote:

> I saw the implementation of drag&drog in gdk/gtk. It seems to work,
> but I think there is a strange limitation : when the ButtonRelease
> event occurs, there are these tests [in gdk.c, line 1560 (approx)] :
> 
> if (((abs (xevent->xbutton.x_root - dnd_startx) > DRAG_THRESHHOLD)
>     || (abs (xevent->xbutton.y_root - dnd_starty) > DRAG_THRESHHOLD)
> 	[...]
> 
> For example, I cannot dnd a button to itself. Ok, it's stupid :) but
> this test could be a nuisance in a list widget (where distance between
> two listitem widgets are short)...

Well, that DRAG_THRESHOLD was in the old Offix implementation, but that
restriction remains in the new implementation (which uses enter/leave
events instead of a threshhold) - you cannot drag a widget onto itself. 

If you have no threshhold at all, then you will not be able to click on a
button:_)

> I've deleted these tests on my gdk, it works fine.
> 
> Secondly, I've noticed another problem : when you drag an object for
> the first time, the cursor doesn't change (but the dnd works). 
> Any solution ?

I think I remember seeing that... Please look at the Gtk currently in CVS,
though; it changed all that DnD stuff (and it probably doesn't work either
:)

-- Elliot					http://www.redhat.com/
"They don't let my code go into shipping products," Gates said. "They
 haven't done that for eight years." (at the 1997 PDC)




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