diff --git a/src/ui/frames.c b/src/ui/frames.c index fc7bf214a..49862a5f2 100644 --- a/src/ui/frames.c +++ b/src/ui/frames.c @@ -611,8 +611,9 @@ meta_frames_attach_style (MetaFrames *frames, gtk_style_detach (frame->style); /* Weirdly, gtk_style_attach() steals a reference count from the style passed in */ - g_object_ref (GTK_WIDGET (frames)->style); - frame->style = gtk_style_attach (GTK_WIDGET (frames)->style, frame->window); + g_object_ref (gtk_widget_get_style (GTK_WIDGET (frames))); + frame->style = gtk_style_attach (gtk_widget_get_style (GTK_WIDGET (frames)), + frame->window); } void diff --git a/src/ui/menu.c b/src/ui/menu.c index 84fc88302..b6f34b8e9 100644 --- a/src/ui/menu.c +++ b/src/ui/menu.c @@ -522,7 +522,7 @@ meta_window_menu_popup (MetaWindowMenu *menu, button, timestamp); - if (!GTK_MENU_SHELL (menu->menu)->have_xgrab) + if (!gtk_widget_get_visible (menu->menu)) meta_warning ("GtkMenu failed to grab the pointer\n"); }