summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-03-04 18:19:42 +0000
committerDavid Robillard <d@drobilla.net>2011-03-04 18:19:42 +0000
commit5042b4a37242f49ec398cf4ce0ae6396a8e77f2a (patch)
tree1150b3b2ed03a8f36139aa94e5fef3b7c445dfb9 /src
parentfead3b45b7472dd0ae51bc14596885fc9b31431e (diff)
downloadsuil-5042b4a37242f49ec398cf4ce0ae6396a8e77f2a.tar.gz
suil-5042b4a37242f49ec398cf4ce0ae6396a8e77f2a.tar.bz2
suil-5042b4a37242f49ec398cf4ce0ae6396a8e77f2a.zip
Gtk2-in-QT4 resize patch from Rui.
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@3039 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/gtk2_in_qt4.cpp8
1 files changed, 6 insertions, 2 deletions
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;