Bug 627699 - Port GTK2 to GTK3, gtk2compat.h extension. r=karlt
authorMartin Stransky <stransky@redhat.com>
Wed, 27 Jun 2012 20:15:32 -0400
changeset 99528 44931b8274b4e659998a447670bfede0d9f6ae2f
parent 99527 b0ed2abf47cc2fa60fc0ab9bc3849528511a1a3c
child 99529 ab0ba9f18f3d17a3d776c7eacb09926699c33a1a
push idunknown
push userunknown
push dateunknown
reviewerskarlt
bugs627699
milestone16.0a1
Bug 627699 - Port GTK2 to GTK3, gtk2compat.h extension. r=karlt
widget/gtk2/gtk2compat.h
--- a/widget/gtk2/gtk2compat.h
+++ b/widget/gtk2/gtk2compat.h
@@ -111,16 +111,22 @@ gtk_widget_set_can_focus(GtkWidget *widg
     GTK_WIDGET_UNSET_FLAGS (widget, GTK_CAN_FOCUS);
 }
 
 static inline void
 gtk_widget_set_window(GtkWidget *widget, GdkWindow *window)
 {
   widget->window = window;
 }
+
+static inline gboolean
+gtk_widget_is_toplevel(GtkWidget *widget)
+{
+  return GTK_WIDGET_TOPLEVEL(widget);
+}
 #endif
 
 #if !GTK_CHECK_VERSION(2, 20, 0)
 static inline void
 gtk_widget_set_mapped(GtkWidget *widget, gboolean mapped)
 {
   if (mapped)
     GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);