vcl/inc/unx/gtk/gtkframe.hxx | 12 ++++-------- vcl/source/window/syswin.cxx | 4 ---- vcl/unx/gtk3/gtk3gtkframe.cxx | 25 ++++--------------------- 3 files changed, 8 insertions(+), 33 deletions(-)
New commits: commit 68fc92db88f17f1dc6113eafbb9e95ebf06d90d1 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Nov 15 13:16:01 2016 +0000 use only widget_set_size_request in gtk3 and remove some bogus out of date comments Change-Id: I589eb64016241cf2bcd425ccbaa62229f36880e8 diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx index 9661ac8..2303e47 100644 --- a/vcl/inc/unx/gtk/gtkframe.hxx +++ b/vcl/inc/unx/gtk/gtkframe.hxx @@ -272,6 +272,9 @@ class GtkSalFrame : public SalFrame static gboolean signalExpose( GtkWidget*, GdkEventExpose*, gpointer ); void askForXEmbedFocus( sal_Int32 nTimecode ); void grabKeyboard(bool bGrab); + void resizeWindow( long nWidth, long nHeight ); + //call gtk_window_resize + void window_resize(long nWidth, long nHeight); #endif static gboolean signalFocus( GtkWidget*, GdkEventFocus*, gpointer ); static gboolean signalMap( GtkWidget*, GdkEvent*, gpointer ); @@ -321,16 +324,9 @@ class GtkSalFrame : public SalFrame return bool(m_nStyle & nMask); } - //call gtk_window_resize if the current size differs and - //block Paints until Configure is received and the size - //is valid again - void window_resize(long nWidth, long nHeight); - //call gtk_widget_set_size_request if the current size request differs and - //block Paints until Configure is received and the size - //is valid again + //call gtk_widget_set_size_request void widget_set_size_request(long nWidth, long nHeight); - void resizeWindow( long nWidth, long nHeight ); void moveWindow( long nX, long nY ); Size calcDefaultSize(); diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index ad4adf4..5780340 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -894,25 +894,9 @@ void GtkSalFrame::moveWindow( long nX, long nY ) void GtkSalFrame::widget_set_size_request(long nWidth, long nHeight) { - gtk_widget_set_size_request(GTK_WIDGET(m_pFixedContainer), nWidth, nHeight ); -} - -void GtkSalFrame::window_resize(long nWidth, long nHeight) -{ m_nWidthRequest = nWidth; m_nHeightRequest = nHeight; - widget_set_size_request(nWidth, nHeight); - gtk_window_resize(GTK_WINDOW(m_pWindow), nWidth, nHeight); -} - -void GtkSalFrame::resizeWindow( long nWidth, long nHeight ) -{ - if( isChild( false ) ) - { - widget_set_size_request(nWidth, nHeight); - } - else if( ! isChild( true, false ) ) - window_resize(nWidth, nHeight); + gtk_widget_set_size_request(GTK_WIDGET(m_pFixedContainer), nWidth, nHeight ); } static void @@ -1604,10 +1588,8 @@ void GtkSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u { m_bDefaultSize = false; - if( isChild( false ) ) + if (!(m_nState & GDK_WINDOW_STATE_MAXIMIZED)) widget_set_size_request(nWidth, nHeight); - else if( ! ( m_nState & GDK_WINDOW_STATE_MAXIMIZED ) ) - window_resize(nWidth, nHeight); setMinMaxSize(); } @@ -1685,7 +1667,7 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState ) (pState->mnState & WindowStateState::Maximized) && (pState->mnMask & nMaxGeometryMask) == nMaxGeometryMask ) { - resizeWindow( pState->mnWidth, pState->mnHeight ); + widget_set_size_request( pState->mnWidth, pState->mnHeight ); moveWindow( pState->mnX, pState->mnY ); m_bDefaultPos = m_bDefaultSize = false; @@ -1895,7 +1877,7 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, SetType eType, Rectangle * // temporarily re-sizeable if( !(m_nStyle & SalFrameStyleFlags::SIZEABLE) ) gtk_window_set_resizable( GTK_WINDOW(m_pWindow), TRUE ); - window_resize(nWidth, nHeight); + widget_set_size_request(nWidth, nHeight); } gtk_window_move(GTK_WINDOW(m_pWindow), nX, nY); commit 1aeff41c4a6b16a2ec69faf4a0bee301bd609101 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Nov 15 13:04:16 2016 +0000 Resolves: tdf#102957 revert SetMinOutputSizePixel workaround of commit afeddaf7e0d11ad9b1df0c80bcc3f50caa87e21a Author: Caolán McNamara <caol...@redhat.com> Date: Wed Dec 16 10:46:10 2015 +0000 Related: rhbz#1281906 set a min size on un-resizeable non-layout dialogs and setting a size-request seems to do the right thing for me now under wayland so the original problem can be solved that way Change-Id: Ie2dd71c5a32131a60729448f0665d5cae2a83692 diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index f7732910..e7e6683 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -1162,10 +1162,6 @@ void SystemWindow::DoInitialLayout() setOptimalLayoutSize(); mbIsCalculatingInitialLayoutSize = false; } - else if (IsDialog() && !(GetStyle() & WB_SIZEABLE)) - { - SetMinOutputSizePixel(GetSizePixel()); - } } void SystemWindow::doDeferredInit(WinBits /*nBits*/) diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 3a1fb9a..ad4adf4 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -901,6 +901,7 @@ void GtkSalFrame::window_resize(long nWidth, long nHeight) { m_nWidthRequest = nWidth; m_nHeightRequest = nHeight; + widget_set_size_request(nWidth, nHeight); gtk_window_resize(GTK_WINDOW(m_pWindow), nWidth, nHeight); }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits