Return to just using the official API for setting
TLW position and size. This works more often with newest version of GTK+ than with oldest versions. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -908,26 +908,17 @@ void wxTopLevelWindowGTK::DoSetSize( int x, int y, int width, int height, int si
|
|||||||
if ((maxWidth != -1) && (m_width > maxWidth)) m_width = maxWidth;
|
if ((maxWidth != -1) && (m_width > maxWidth)) m_width = maxWidth;
|
||||||
if ((maxHeight != -1) && (m_height > maxHeight)) m_height = maxHeight;
|
if ((maxHeight != -1) && (m_height > maxHeight)) m_height = maxHeight;
|
||||||
|
|
||||||
bool do_move = false;
|
|
||||||
bool do_resize = false;
|
|
||||||
|
|
||||||
if ((m_x != -1) || (m_y != -1))
|
if ((m_x != -1) || (m_y != -1))
|
||||||
{
|
{
|
||||||
if ((m_x != old_x) || (m_y != old_y))
|
if ((m_x != old_x) || (m_y != old_y))
|
||||||
{
|
{
|
||||||
if (m_widget->window)
|
gtk_window_move( GTK_WINDOW(m_widget), m_x, m_y );
|
||||||
do_move = true;
|
|
||||||
else
|
|
||||||
gtk_window_move( GTK_WINDOW(m_widget), m_x, m_y );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((m_width != old_width) || (m_height != old_height))
|
if ((m_width != old_width) || (m_height != old_height))
|
||||||
{
|
{
|
||||||
if (m_widget->window)
|
gtk_window_resize( GTK_WINDOW(m_widget), m_width, m_height );
|
||||||
do_resize = true;
|
|
||||||
else
|
|
||||||
gtk_window_resize( GTK_WINDOW(m_widget), m_width, m_height );
|
|
||||||
|
|
||||||
/* we set the size in GtkOnSize, i.e. mostly the actual resizing is
|
/* we set the size in GtkOnSize, i.e. mostly the actual resizing is
|
||||||
done either directly before the frame is shown or in idle time
|
done either directly before the frame is shown or in idle time
|
||||||
@@ -935,14 +926,6 @@ void wxTopLevelWindowGTK::DoSetSize( int x, int y, int width, int height, int si
|
|||||||
m_sizeSet = false;
|
m_sizeSet = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (do_move && do_resize)
|
|
||||||
gdk_window_move_resize( m_widget->window, m_x, m_y, m_width, m_height );
|
|
||||||
else if (do_move)
|
|
||||||
gdk_window_move( m_widget->window, m_x, m_y );
|
|
||||||
else if (do_resize)
|
|
||||||
gdk_window_resize( m_widget->window, m_width, m_height );
|
|
||||||
|
|
||||||
|
|
||||||
m_resizing = false;
|
m_resizing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user