Popup-menu-like focus behaviour for GTK_WINDOW_POPUP



Hi,

  in my application I would like a right-click to bring up a context 
menu.  So far so good.  However, I would like the context menu to contain 
graphical data in the form of GtkPlot (from gtk+extra) widgets.

  Therefore, a GtkMenu is not suitable (since it only allows GtkMenuItem 
children).  No problem I thought, I will just use a GtkWindow of type 
GTK_WINDOW_POPUP.  This works well enough except for one irritation.  
When a menu is popped up, the window manager keeps the focus with the 
main application window.  However, when my new GtkWindow is popped up, 
the window manager gives focus to this window.

  So, my question is, how does a GtkMenu avoid this behaviour, and how 
can I get my popup GtkWindow to do the same?  Or, does anyone have any 
suggestions for alternative approaches?

  Thanks

John




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