diff options
author | David Robillard <d@drobilla.net> | 2011-03-04 18:19:42 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-03-04 18:19:42 +0000 |
commit | 5042b4a37242f49ec398cf4ce0ae6396a8e77f2a (patch) | |
tree | 1150b3b2ed03a8f36139aa94e5fef3b7c445dfb9 | |
parent | fead3b45b7472dd0ae51bc14596885fc9b31431e (diff) | |
download | suil-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
-rw-r--r-- | src/gtk2_in_qt4.cpp | 8 |
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; |