From 585507a4127ff91d9360ca16938dbd36153aef0d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 1 Dec 2015 13:27:21 +0000 Subject: gtk3+wayland: wrong dialog sizes use inner container, not outer toxic toplevel Change-Id: I44f2fe1e8e346e51e65158f7864293ef37732345 --- vcl/unx/gtk/gtksalframe.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'vcl/unx/gtk') diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index 791e04e3245e..d147b496b1a2 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -943,22 +943,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; @@ -1080,7 +1082,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 ); #if GTK_CHECK_VERSION(3,14,0) GtkGesture *pSwipe = gtk_gesture_swipe_new(pEventWidget); g_signal_connect(pSwipe, "swipe", G_CALLBACK(gestureSwipe), this); -- cgit