Re: supporting drag and drop in menus (gtk+ 1.2)



On Tue, Oct 23, 2001 at 08:52:00PM -0400, Benjamin Kahn wrote:
> 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)
> 
> However, I believe that the problem is in GTK itself in
> gtk_drag_find_widget.

Hi Ben,

Could it be related to the "DnD code doesn't notice new windows" bug?

	http://bugzilla.gnome.org/show_bug.cgi?id=56349

I found this problem with ROX-Filer, which opens a new filer window if you
hold the pointer over a directory. Overlapping windows don't work
correctly because Gtk misunderstands the information about where the new
window is in the window stack.

The fix is trivial, but I don't know when it will get applied.


-- 
Thomas Leonard			http://rox.sourceforge.net
tal00r ecs soton ac uk		tal197 users sourceforge net



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