MacArthur, Ian (SELEX) (UK) wrote:
> I tried this on WinXP this morning. Didn't work at first, due to some
> oddness in the way the events are received, I think.
> 
> Basically, the handle method sets the class variable "evt" to record the
> last event received - this is later tested in dnd_cb() to make sure the
> last event was an FL_PASTE when receiving the dropped data.
> 
> Except that on WinXP, by the time the callback runs, the value of "evt"
> is always FL_MOVE (not FL_PASTE) - even when I hold the mouse Really
> Really Still.
> In fact, it really does look as if some move events are received after
> the drop event...

        Interesting.

        Ya, I wasn't sure what the purpose of recording the event
        value was, or why the timer callback didn't just directly
        call dnd_open(), ie:

static void callback_deferred(void *v)  // I called this "timer_callback()" in 
my rev
{
    // timer callback
    extern void dnd_open(const char *urls, size_t length);
    Fl_DND_Box *w = (Fl_DND_Box*)v;
    dnd_open(w->paste_buf, w->paste_len);
    Fl::remove_timeout(Fl_DND_Box::timed_callback, v);
}

        Then maybe dnd_cb() and w->callback(dnd_cb) and the evt
        wouldn't be needed?

        I might be missing something though; I didn't follow the
        beginning of this thread carefully, so I left that stuff alone.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to