Bug 805753 - Gtk 2.10 compat layer misses gtk_widget_set_has_window r=roc
authorIan Neal <iann_cvs@blueyonder.co.uk>
Sun, 28 Oct 2012 22:13:50 +0000
changeset 111767 f161ad73100bf23b293f86a0bc3cb8faa46c4157
parent 111766 aa367b01df3f8f4640c73a64dc2b2c1349b4aff0
child 111768 76a12989a99c165d42309696afc99a3d92a8c2aa
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersroc
bugs805753
milestone19.0a1
Bug 805753 - Gtk 2.10 compat layer misses gtk_widget_set_has_window r=roc
widget/gtk2/compat/gtk/gtkwidget.h
--- a/widget/gtk2/compat/gtk/gtkwidget.h
+++ b/widget/gtk2/compat/gtk/gtkwidget.h
@@ -61,16 +61,22 @@ gtk_widget_has_focus(GtkWidget *widget)
 }
 
 static inline gboolean
 gtk_widget_has_grab(GtkWidget *widget)
 {
   return GTK_WIDGET_HAS_GRAB(widget);
 }
 
+static inline gboolean
+gtk_widget_get_has_window(GtkWidget *widget)
+{
+  return !GTK_WIDGET_NO_WINDOW(widget);
+}
+
 static inline void
 gtk_widget_get_allocation(GtkWidget *widget, GtkAllocation *allocation)
 {
   *allocation = widget->allocation;
 }
 
 static inline void
 gtk_widget_set_allocation(GtkWidget *widget, const GtkAllocation *allocation)
@@ -83,16 +89,25 @@ gtk_widget_set_can_focus(GtkWidget *widg
 {
   if (can_focus)
     GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_FOCUS);
   else
     GTK_WIDGET_UNSET_FLAGS (widget, GTK_CAN_FOCUS);
 }
 
 static inline void
+gtk_widget_set_has_window(GtkWidget *widget, gboolean has_window)
+{
+  if (has_window)
+    GTK_WIDGET_UNSET_FLAGS (widget, GTK_NO_WINDOW);
+  else
+    GTK_WIDGET_SET_FLAGS (widget, GTK_NO_WINDOW);
+}
+
+static inline void
 gtk_widget_set_window(GtkWidget *widget, GdkWindow *window)
 {
   widget->window = window;
 }
 
 static inline gboolean
 gtk_widget_is_toplevel(GtkWidget *widget)
 {