summaryrefslogtreecommitdiffstats
path: root/src/gtk2_in_qt4.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtk2_in_qt4.cpp')
-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;