On Ubuntu 10.04 I have some normal drop down menus that would be more useful as tear-off menus (i.e. as draggable menus that pop up and stay in the window/dialog). FOR TOPWINDOW: To make the tear-off menu appear I use the code: [code] gtk_menu_set_tearoff_state ((GtkMenu *)m->menuwidget, true ) ; [/code] This causes the the tear-off menu to appear in the window at current cursor position. It is embedded in a window with a title bar. The following messages appear when when gtk_menu_set_tearoff_state is executed: Gdk-CRITICAL **: gdk_drawable_get_size: assertion `GDK_IS_DRAWABLE (drawable)' failed Gdk-CRITICAL **: gdk_window_get_position: assertion `GDK_IS_WINDOW (window)' failed repeated about ten times I then click a menu item in the tear-off menu and get around 50 more gdk_window_get_position: assertion messages. The action event of the menu item is not carried out, but menu items change colour when I move the cursor above them.. FOR MENUS IN DIALOGS: Using the same gtk_menu_set_tearoff_state function this time the error message is: Gdk-CRITICAL **: gdk_drawable_get_size: assertion `GDK_IS_DRAWABLE (drawable)' failed and only that. The tear-off menu is not clickable. When I move the cursor over it the menu items do not change colour. Of course I could use a listbox (=listview with one column) but that would involve a fair amount of extra work. The tear-off menu is exactly what I need, but how can I make it work? Grateful for advice. |