summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-11-15 13:16:01 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-11-15 13:23:44 +0000
commit68fc92db88f17f1dc6113eafbb9e95ebf06d90d1 (patch)
tree3ad4d8beafa898ebdbdc4c6a4ae584b7980bf8cf /vcl
parent1aeff41c4a6b16a2ec69faf4a0bee301bd609101 (diff)
use only widget_set_size_request in gtk3
and remove some bogus out of date comments Change-Id: I589eb64016241cf2bcd425ccbaa62229f36880e8
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/unx/gtk/gtkframe.hxx12
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx26
2 files changed, 8 insertions, 30 deletions
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 9661ac81ac5e..2303e472c940 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 ad4adf440ad3..578034009104 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);