From 5042b4a37242f49ec398cf4ce0ae6396a8e77f2a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 4 Mar 2011 18:19:42 +0000 Subject: Gtk2-in-QT4 resize patch from Rui. git-svn-id: http://svn.drobilla.net/lad/trunk/suil@3039 a436a847-0d15-0410-975c-d299462d15a1 --- src/gtk2_in_qt4.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/gtk2_in_qt4.cpp') diff --git a/src/gtk2_in_qt4.cpp b/src/gtk2_in_qt4.cpp index 0b23ad5..6df4ddd 100644 --- a/src/gtk2_in_qt4.cpp +++ b/src/gtk2_in_qt4.cpp @@ -43,15 +43,19 @@ suil_wrap(const char* host_type_uri, SuilInstance instance) { GtkWidget* const plug = gtk_plug_new(0); + GtkWidget* const widget = (GtkWidget*)instance->ui_widget; - gtk_container_add(GTK_CONTAINER(plug), - (GtkWidget*)instance->ui_widget); + gtk_container_add(GTK_CONTAINER(plug), widget); gtk_widget_show_all(plug); QX11EmbedContainer* const wrapper = new QX11EmbedContainer(); wrapper->embedClient(gtk_plug_get_id(GTK_PLUG(plug))); + GtkAllocation alloc; + gtk_widget_get_allocation(widget, &alloc); + wrapper->resize(alloc.width, alloc.height); + instance->host_widget = wrapper; return 0; -- cgit v1.2.1