Index: trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp	(revision 78672)
+++ trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp	(revision 78680)
@@ -204,4 +204,7 @@
 const char *UIExtraDataDefs::GUI_GuestControl_ProcessControlDialogGeometry = "GUI/GuestControl/ProcessControlDialogGeometry";
 
+/* Soft Keyboard: */
+const char *UIExtraDataDefs::GUI_SoftKeyboard_DialogGeometry = "GUI/SoftKeyboardDialogGeometry";
+
 /* File Manager options: */
 const char *UIExtraDataDefs::GUI_GuestControl_FileManagerOptions = "GUI/GuestControl/FileManagerOptions";
Index: trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h	(revision 78672)
+++ trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h	(revision 78680)
@@ -382,4 +382,9 @@
     /** @} */
 
+    /** @name Soft Keyboard related data
+      * @{ */
+        extern const char *GUI_SoftKeyboard_DialogGeometry;
+    /** @} */
+
     /** @name File Manager options
       * @{ */
Index: trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp	(revision 78672)
+++ trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp	(revision 78680)
@@ -4289,4 +4289,23 @@
 }
 
+QRect UIExtraDataManager::softKeyboardDialogGeometry(QWidget *pWidget, const QRect &defaultGeometry)
+{
+    return dialogGeometry(GUI_SoftKeyboard_DialogGeometry, pWidget, defaultGeometry);
+}
+
+void UIExtraDataManager::setSoftKeyboardDialogGeometry(const QRect &geometry, bool fMaximized)
+{
+    setDialogGeometry(GUI_SoftKeyboard_DialogGeometry, geometry, fMaximized);
+}
+
+bool UIExtraDataManager::softKeyboardDialogShouldBeMaximized()
+{
+    /* Get corresponding extra-data: */
+    const QStringList data = extraDataStringList(GUI_SoftKeyboard_DialogGeometry);
+
+    /* Make sure 5th item has required value: */
+    return data.size() == 5 && data[4] == GUI_Geometry_State_Max;
+}
+
 void UIExtraDataManager::setFileManagerOptions(bool fListDirectoriesFirst,
                                                bool fShowDeleteConfirmation,
Index: trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h	(revision 78672)
+++ trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h	(revision 78680)
@@ -669,4 +669,11 @@
         void setFileManagerVisiblePanels(const QStringList &panelNameList);
         QStringList fileManagerVisiblePanels();
+    /** @} */
+
+    /** @name Soft Keyboard
+      * @{ */
+        QRect softKeyboardDialogGeometry(QWidget *pWidget, const QRect &defaultGeometry);
+        void setSoftKeyboardDialogGeometry(const QRect &geometry, bool fMaximized);
+        bool softKeyboardDialogShouldBeMaximized();
     /** @} */
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp	(revision 78672)
+++ trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp	(revision 78680)
@@ -636,5 +636,4 @@
     setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
     /* Create layout: */
-
     m_pMainLayout = new QHBoxLayout(this);
     if (!m_pMainLayout)
@@ -643,5 +642,5 @@
     if (!m_pContainerWidget)
         return;
-    m_pContainerWidget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
+    //m_pContainerWidget->setStyleSheet("background-color:red;");
     m_pMainLayout->addWidget(m_pContainerWidget);
 }
@@ -720,4 +719,6 @@
 
     int y = 0;
+    int totalHeight = 0;
+    int totalWidth = 0;
     for (int i = 0; i < m_rows.size(); ++i)
     {
@@ -728,7 +729,8 @@
         pRow->setVisible(true);
         y += fMultiplier * pRow->m_iHeight;
-         pRow->updateLayout();
-    }
-    update();
+        totalWidth += fMultiplier * pRow->m_iWidth;
+        totalHeight += fMultiplier * pRow->m_iHeight;
+        pRow->updateLayout();
+    }
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboardDialog.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboardDialog.cpp	(revision 78672)
+++ trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboardDialog.cpp	(revision 78680)
@@ -109,5 +109,5 @@
     const QRect desktopRect = gpDesktop->availableGeometry(this);
     int iDefaultWidth = desktopRect.width() / 2;
-    int iDefaultHeight = desktopRect.height() * 3 / 4;
+    int iDefaultHeight = 0.5 * iDefaultWidth;
 
     QRect defaultGeometry(0, 0, iDefaultWidth, iDefaultHeight);
@@ -116,5 +116,5 @@
 
     /* Load geometry from extradata: */
-    QRect geometry = gEDataManager->guestProcessControlDialogGeometry(this, defaultGeometry);
+    QRect geometry = gEDataManager->softKeyboardDialogGeometry(this, defaultGeometry);
 
     /* Restore geometry: */
@@ -131,9 +131,9 @@
     /* darwinIsWindowMaximized expects a non-const QWidget*. thus const_cast: */
     QWidget *pw = const_cast<QWidget*>(qobject_cast<const QWidget*>(this));
-    gEDataManager->setGuestProcessControlDialogGeometry(saveGeometry, ::darwinIsWindowMaximized(pw));
+    gEDataManager->setSoftKeyboardDialogGeometry(saveGeometry, ::darwinIsWindowMaximized(pw));
 #else /* !VBOX_WS_MAC */
-    gEDataManager->setGuestProcessControlDialogGeometry(saveGeometry, isMaximized());
+    gEDataManager->setSoftKeyboardDialogGeometry(saveGeometry, isMaximized());
 #endif /* !VBOX_WS_MAC */
-    LogRel2(("GUI: Guest Process Control Dialog: Geometry saved as: Origin=%dx%d, Size=%dx%d\n",
+    LogRel2(("GUI: Soft Keyboard Dialog: Geometry saved as: Origin=%dx%d, Size=%dx%d\n",
              saveGeometry.x(), saveGeometry.y(), saveGeometry.width(), saveGeometry.height()));
 }
@@ -141,5 +141,5 @@
 bool UISoftKeyboardDialog::shouldBeMaximized() const
 {
-    return gEDataManager->guestProcessControlDialogShouldBeMaximized();
+    return gEDataManager->softKeyboardDialogShouldBeMaximized();
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/xml/us_layout.xml
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/xml/us_layout.xml	(revision 78672)
+++ trunk/src/VBox/Frontends/VirtualBox/xml/us_layout.xml	(revision 78680)
@@ -2,5 +2,5 @@
 <layout>
     <row>
-        <height>50</height>
+        <height>40</height>
         <key>
             <width>50</width>
@@ -95,5 +95,5 @@
     </row>
     <row>
-        <height>50</height>
+        <height>40</height>
         <key>
             <width>50</width>
@@ -195,5 +195,5 @@
     </row>
     <row>
-        <height>50</height>
+        <height>40</height>
         <key>
             <width>70</width>
@@ -286,5 +286,5 @@
 
     <row>
-        <height>50</height>
+        <height>40</height>
         <key>
             <width>70</width>
@@ -370,5 +370,5 @@
     </row>
     <row>
-        <height>50</height>
+        <height>40</height>
         <key>
             <width>115</width>
@@ -451,5 +451,5 @@
 
     <row>
-        <height>50</height>
+        <height>40</height>
         <key>
             <width>90</width>
