supporting drag and drop in menus (gtk+ 1.2)



I'm writing a small panel filemanager applet called File Menu Applet. 
It presents your file system in a menu.  

( http://www.gnome.org/applist/view.php3?name=FileMenuApplet )
(Screenshot: http://primates.ximian.com/~xkahn/file_menu_applet.png)

I would like to support dragging files from other applications (like
Nautilus say) onto the menu.  For this to work, menus have to detect a
drag and open if they have a submenu.  For the most part I've written
this and it works great.  However, during the drag -- if menus overlap
-- the lowermost menu will get the drag event.  Here is a screenshot
trying to show the problem.  Notice that the drag highlight rectangle is
underneath the top menu.  

http://primates.ximian.com/~xkahn/fma-bug.png

Now, this could certainly be my fault.  Here is a link to the code in
question: (sorry it's so messy right now.  I've been fighting with this
for a while and things have gotten pretty ugly)

http://cvs.gnome.org/bonsai/cvsblame.cgi?file=file_menu_applet/src/dnd.c&rev=&root=/cvs/gnome

However, I believe that the problem is in GTK itself in
gtk_drag_find_widget.

http://cvs.gnome.org/bonsai/cvsblame.cgi?file=gtk%2b/gtk/gtkdnd.c&rev=&root=/cvs/gnome#1209

Any help would be greatly appreciated.




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