gcompat: gtk_widget_get_window() for below 2.14
[fio.git] / gcompat.c
index f691ec11de89b4e42b11cbbd8220fc9cbea3bca8..7b0810ba4d8a36629699b306bc7d379ab1363147 100644 (file)
--- a/gcompat.c
+++ b/gcompat.c
@@ -33,3 +33,17 @@ gchar *gtk_combo_box_text_get_active_text(GtkComboBoxText *combo_box)
 }
 
 #endif
+
+#if GTK_MAJOR_VERSION < 3
+
+guint gtk_widget_get_allocated_width(GtkWidget *w)
+{
+       return w->allocation.width;
+}
+
+guint gtk_widget_get_allocated_height(GtkWidget *w)
+{
+       return w->allocation.height;
+}
+
+#endif