popup menu focus/grab problem





---------- Forwarded message ----------
From: Axel von Bertoldi <bertoldia gmail com>
Date: Wed, Apr 30, 2008 at 5:36 PM
Subject: popup menu focus/grab problem
To: gtk-list gnome org


Hello all,

I'm the developer of this little applet. I'm currently implementing implementing a right-click context menu for the file and directory menu items and have run into some mouse focus/grab issues. The right-click pops the menu up fine and the first menu item gets the focus, which is all fine.  The problem appears when I move the mouse away from the popup menu. The rest of the applet (i.e. all other menu and menu items) is still active an responds to mouse events including navigation. So, with a context menu popped up for a particular menu item, I can still navigate other menus/sub_menus and even have the menu item associated with the popup menu disappear all together; I can popup several context menus on different menu items. I end up with a mess of popup menus all over the place (see attached screenshots, and ignore the menu items). Furthermore, clicking on the desktop or other application windows does not make the popup menus disappear.

I'm trying to match the behaviour of the gnome main menu and have looked at its source (specifically menu.c and panel-menu-bar.c), but can't find how they are doing this. I've also tried countless combinations of gtk_grab_add() and gdk_pointer_grab() but can't get (even close to) the behaviour I want.

Any help would be greatly appreciated. I can provide code snippets if requested.

Thanks,
axel.

http://gnome-menu-file-browser-applet.googlecode.com/svn/web/bug_screenshot1.jpg
http://gnome-menu-file-browser-applet.googlecode.com/svn/web/bug_screenshot2.jpg



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