[mutter] Replace left-over accesses of struct members



commit 5526e91b6ef8a1896f3809216c55191826e58f0d
Author: Florian Müllner <fmuellner src gnome org>
Date:   Mon May 10 23:40:06 2010 +0200

    Replace left-over accesses of struct members
    
    When replacing direct accesses with accessor functions, two snippets
    were left out. Mutter now builds with GSEAL_ENABLE.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=595496

 src/ui/frames.c |    5 +++--
 src/ui/menu.c   |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index fc7bf21..49862a5 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 84fc883..b6f34b8 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");
 }
 



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