summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorAntonio Fernandez <antonio.fernandez@aentos.es>2012-10-15 18:16:39 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-11-14 13:52:56 +0100
commit4e112800895748775a4e3d194985f3baa78f1270 (patch)
tree062b448dfa5a2d84a72ffdcc693c41579abddae7 /vcl/unx
parentb561590534afc4152282db44c24cb4788bd03730 (diff)
Menus now work properly when opening an application from LO's main screen.
Change-Id: Ib4947f5b48f508d66beab6952098c8d27e03ad21
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk/window/gtksalmenu.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx
index 2dfed291eed8..b9d9325e3f7f 100644
--- a/vcl/unx/gtk/window/gtksalmenu.cxx
+++ b/vcl/unx/gtk/window/gtksalmenu.cxx
@@ -474,9 +474,12 @@ void GtkSalMenu::SetFrame( const SalFrame* pFrame )
mpFrame = static_cast< const GtkSalFrame* >( pFrame );
// Clean menu model and action group if needed.
- GObject* pWindow = G_OBJECT( pFrameNonConst->getWindow() );
- GLOMenu* pMenuModel = G_LO_MENU( g_object_get_data( pWindow, "g-lo-menubar" ) );
- GLOActionGroup* pActionGroup = G_LO_ACTION_GROUP( g_object_get_data( pWindow, "g-lo-action-group" ) );
+// GObject* pWindow = G_OBJECT( pFrameNonConst->getWindow() );
+ GtkWidget* pWidget = pFrameNonConst->getWindow();
+ GdkWindow* gdkWindow = gtk_widget_get_window( pWidget );
+
+ GLOMenu* pMenuModel = G_LO_MENU( g_object_get_data( G_OBJECT( gdkWindow ), "g-lo-menubar" ) );
+ GLOActionGroup* pActionGroup = G_LO_ACTION_GROUP( g_object_get_data( G_OBJECT( gdkWindow ), "g-lo-action-group" ) );
if ( pMenuModel && g_menu_model_get_n_items( G_MENU_MODEL( pMenuModel ) ) > 0 )
g_lo_menu_remove( pMenuModel, 0 );