m_deferShowAllowed = true;
m_updateDecorSize = true;
m_netFrameExtentsTimerId = 0;
+ m_incWidth = m_incHeight = 0;
m_urgency_hint = -2;
}
}
// GTK sometimes chooses very small size if max size hint is not explicitly set
- DoSetSizeHints(m_minWidth, m_minHeight, m_maxWidth, m_maxHeight, -1, -1);
+ DoSetSizeHints(m_minWidth, m_minHeight, m_maxWidth, m_maxHeight, m_incWidth, m_incHeight);
m_decorSize = GetCachedDecorSize();
int w, h;
int incW, int incH )
{
base_type::DoSetSizeHints(minW, minH, maxW, maxH, incW, incH);
+ m_incWidth = incW;
+ m_incHeight = incH;
const wxSize minSize = GetMinSize();
const wxSize maxSize = GetMaxSize();
const wxSize diff = decorSize - m_decorSize;
m_decorSize = decorSize;
bool resized = false;
+ if (m_minWidth > 0 || m_minHeight > 0 || m_maxWidth > 0 || m_maxHeight > 0)
+ {
+ // update size hints, they depend on m_decorSize
+ DoSetSizeHints(m_minWidth, m_minHeight, m_maxWidth, m_maxHeight, m_incWidth, m_incHeight);
+ }
if (m_deferShow)
{
// keep overall size unchanged by shrinking m_widget
int w, h;
GTKDoGetSize(&w, &h);
// but not if size would be less than minimum, it won't take effect
- const wxSize minSize = GetMinSize();
- if (w >= minSize.x && h >= minSize.y)
+ if (w >= m_minWidth - decorSize.x && h >= m_minHeight - decorSize.y )
{
gtk_window_resize(GTK_WINDOW(m_widget), w, h);
resized = true;