From b902e759cb986cd54120e0b853f68f05459c3104 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Mon, 21 Jun 2010 17:46:44 +0900 Subject: [PATCH] eekboard: use widget allocation size for initial keyboard size --- src/eekboard.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/eekboard.c b/src/eekboard.c index c41ad79f..50c95fd1 100644 --- a/src/eekboard.c +++ b/src/eekboard.c @@ -325,13 +325,15 @@ on_changed (EekLayout *layout, gpointer user_data) { Eekboard *eekboard = user_data; GtkWidget *vbox, *widget; + GtkAllocation allocation; + gtk_widget_get_allocation (GTK_WIDGET (eekboard->widget), &allocation); vbox = gtk_widget_get_parent (eekboard->widget); /* gtk_widget_destroy() seems not usable for GtkClutterEmbed */ gtk_container_remove (GTK_CONTAINER(vbox), eekboard->widget); g_object_unref (eekboard->keyboard); - widget = create_widget (eekboard, eekboard->width, eekboard->height); + widget = create_widget (eekboard, allocation.width, allocation.height); gtk_container_add (GTK_CONTAINER(vbox), widget); gtk_widget_show_all (vbox); }