News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
drag 'n drop from external applications?
Author Message
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #1
RE: drag 'n drop from external applications?

I had once had a very inconsistent drag-and-drop working after several hours of hair pulling, but it seemed to work only if you dragged and dropped very deliberately, and only in certain desktop environments (definitely not portable). At the time I thought it was too flakey to bother with any further, so haven't touched it since, but you might be able to make something of it.

Code:
function dnd_check()
  if Fl:event() == fltk.FL_DND_RELEASE then
    Fl:paste(window)
    Fl:wait()
    local dropped_file=Fl:event_text()
    if dropped_file then
      print(dropped_file)
    end
  end
Fl:wait()
  timer:doWait(0.05)
end

timer=murgaLua.createFltkTimer()
timer:callback(dnd_check)
timer:do_callback()

07-17-2008 01:16 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
RE: drag 'n drop from external applications? - mikshaw - 07-17-2008 01:16 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: