Blob Blame History Raw
From 88f9c7f53ad1abc49d8ed4cfc46081d767b0c065 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Tue, 1 Dec 2015 13:27:21 +0000
Subject: [PATCH] gtk3+wayland: wrong dialog sizes

use inner container, not outer toxic toplevel

Change-Id: I44f2fe1e8e346e51e65158f7864293ef37732345
---
 vcl/unx/gtk/window/gtksalframe.cxx | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index dd03073..99624e0 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -950,22 +950,24 @@ void GtkSalFrame::moveWindow( long nX, long nY )
 
 void GtkSalFrame::widget_set_size_request(long nWidth, long nHeight)
 {
+#if !GTK_CHECK_VERSION(3,0,0)
     gint nOrigwidth, nOrigheight;
     gtk_window_get_size(GTK_WINDOW(m_pWindow), &nOrigwidth, &nOrigheight);
-#if !GTK_CHECK_VERSION(3,0,0)
     if (nWidth > nOrigwidth || nHeight > nOrigheight)
     {
         m_bPaintsBlocked = true;
     }
-#endif
     gtk_widget_set_size_request(m_pWindow, nWidth, nHeight );
+#else
+    gtk_widget_set_size_request(GTK_WIDGET(m_pFixedContainer), nWidth, nHeight );
+#endif
 }
 
 void GtkSalFrame::window_resize(long nWidth, long nHeight)
 {
+#if !GTK_CHECK_VERSION(3,0,0)
     gint nOrigwidth, nOrigheight;
     gtk_window_get_size(GTK_WINDOW(m_pWindow), &nOrigwidth, &nOrigheight);
-#if !GTK_CHECK_VERSION(3,0,0)
     if (nWidth > nOrigwidth || nHeight > nOrigheight)
     {
         m_bPaintsBlocked = true;
@@ -1087,7 +1089,7 @@ void GtkSalFrame::InitCommon()
     m_aMouseSignalIds.push_back(g_signal_connect( G_OBJECT(pEventWidget), "button-release-event", G_CALLBACK(signalButton), this ));
 #if GTK_CHECK_VERSION(3,0,0)
     g_signal_connect( G_OBJECT(m_pFixedContainer), "draw", G_CALLBACK(signalDraw), this );
-    g_signal_connect( G_OBJECT(m_pWindow), "size-allocate", G_CALLBACK(sizeAllocated), this );
+    g_signal_connect( G_OBJECT(m_pFixedContainer), "size-allocate", G_CALLBACK(sizeAllocated), this );
 //    g_signal_connect( G_OBJECT(m_pWindow), "state-flags-changed", G_CALLBACK(signalFlagsChanged), this );
 #if GTK_CHECK_VERSION(3,14,0)
     GtkGesture *pSwipe = gtk_gesture_swipe_new(pEventWidget);
-- 
2.5.0