486317d
From 585507a4127ff91d9360ca16938dbd36153aef0d Mon Sep 17 00:00:00 2001
486317d
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
486317d
Date: Tue, 1 Dec 2015 13:27:21 +0000
486317d
Subject: [PATCH] gtk3+wayland: wrong dialog sizes
486317d
486317d
use inner container, not outer toxic toplevel
486317d
486317d
Change-Id: I44f2fe1e8e346e51e65158f7864293ef37732345
486317d
---
486317d
 vcl/unx/gtk/gtksalframe.cxx | 10 ++++++----
486317d
 1 file changed, 6 insertions(+), 4 deletions(-)
486317d
486317d
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx
486317d
index 791e04e..d147b49 100644
486317d
--- a/vcl/unx/gtk/gtksalframe.cxx
486317d
+++ b/vcl/unx/gtk/gtksalframe.cxx
486317d
@@ -943,22 +943,24 @@ void GtkSalFrame::moveWindow( long nX, long nY )
486317d
 
486317d
 void GtkSalFrame::widget_set_size_request(long nWidth, long nHeight)
486317d
 {
486317d
+#if !GTK_CHECK_VERSION(3,0,0)
486317d
     gint nOrigwidth, nOrigheight;
486317d
     gtk_window_get_size(GTK_WINDOW(m_pWindow), &nOrigwidth, &nOrigheight);
486317d
-#if !GTK_CHECK_VERSION(3,0,0)
486317d
     if (nWidth > nOrigwidth || nHeight > nOrigheight)
486317d
     {
486317d
         m_bPaintsBlocked = true;
486317d
     }
486317d
-#endif
486317d
     gtk_widget_set_size_request(m_pWindow, nWidth, nHeight );
486317d
+#else
486317d
+    gtk_widget_set_size_request(GTK_WIDGET(m_pFixedContainer), nWidth, nHeight );
486317d
+#endif
486317d
 }
486317d
 
486317d
 void GtkSalFrame::window_resize(long nWidth, long nHeight)
486317d
 {
486317d
+#if !GTK_CHECK_VERSION(3,0,0)
486317d
     gint nOrigwidth, nOrigheight;
486317d
     gtk_window_get_size(GTK_WINDOW(m_pWindow), &nOrigwidth, &nOrigheight);
486317d
-#if !GTK_CHECK_VERSION(3,0,0)
486317d
     if (nWidth > nOrigwidth || nHeight > nOrigheight)
486317d
     {
486317d
         m_bPaintsBlocked = true;
486317d
@@ -1080,7 +1082,7 @@ void GtkSalFrame::InitCommon()
486317d
     m_aMouseSignalIds.push_back(g_signal_connect( G_OBJECT(pEventWidget), "button-release-event", G_CALLBACK(signalButton), this ));
486317d
 #if GTK_CHECK_VERSION(3,0,0)
486317d
     g_signal_connect( G_OBJECT(m_pFixedContainer), "draw", G_CALLBACK(signalDraw), this );
486317d
-    g_signal_connect( G_OBJECT(m_pWindow), "size-allocate", G_CALLBACK(sizeAllocated), this );
486317d
+    g_signal_connect( G_OBJECT(m_pFixedContainer), "size-allocate", G_CALLBACK(sizeAllocated), this );
486317d
 #if GTK_CHECK_VERSION(3,14,0)
486317d
     GtkGesture *pSwipe = gtk_gesture_swipe_new(pEventWidget);
486317d
     g_signal_connect(pSwipe, "swipe", G_CALLBACK(gestureSwipe), this);
486317d
-- 
486317d
2.5.0
486317d