summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gtk2_in_qt4.cpp4
-rw-r--r--wscript7
2 files changed, 10 insertions, 1 deletions
diff --git a/src/gtk2_in_qt4.cpp b/src/gtk2_in_qt4.cpp
index 844e45b..2d18df7 100644
--- a/src/gtk2_in_qt4.cpp
+++ b/src/gtk2_in_qt4.cpp
@@ -51,9 +51,13 @@ suil_wrap(const char* host_type_uri,
QX11EmbedContainer* const wrapper = new QX11EmbedContainer();
wrapper->embedClient(gtk_plug_get_id(GTK_PLUG(plug)));
+#ifdef SUIL_OLD_GTK
+ wrapper->resize(widget->allocation.width, widget->allocation.height);
+#else
GtkAllocation alloc;
gtk_widget_get_allocation(widget, &alloc);
wrapper->resize(alloc.width, alloc.height);
+#endif
instance->host_widget = wrapper;
diff --git a/wscript b/wscript
index 1fed698..b57bc68 100644
--- a/wscript
+++ b/wscript
@@ -39,7 +39,12 @@ def configure(conf):
autowaf.check_header(conf, 'lv2/lv2plug.in/ns/extensions/ui/ui.h')
autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK2',
- atleast_version='2.0.0', mandatory=False)
+ atleast_version='2.18.0', mandatory=False)
+ if not conf.env['HAVE_GTK2']:
+ autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK2',
+ atleast_version='2.0.0', mandatory=False)
+ if conf.env['HAVE_GTK']:
+ autowaf.define('SUIL_OLD_GTK', 1)
autowaf.check_pkg(conf, 'QtGui', uselib_store='QT4',
atleast_version='4.0.0', mandatory=False)