- wxSize& decorSize = GetDecorSize(win->m_gdkDecor);
- const wxSize size =
- wxSize(int(data[0] + data[1]), int(data[2] + data[3]));
- if (decorSize.x != size.x || decorSize.y != size.y)
+ long* p = (long*)data;
+ const wxSize decorSize =
+ wxSize(int(p[0] + p[1]), int(p[2] + p[3]));
+ if (win->m_decorSize != decorSize)
+ {
+ const wxSize diff = decorSize - win->m_decorSize;
+ win->m_decorSize = decorSize;
+ bool resized = false;
+ if (win->m_deferShow)
+ {
+ // keep overall size unchanged by shrinking m_widget,
+ // if min size will allow it
+ const wxSize minSize = win->GetMinSize();
+ int w, h;
+ win->GTKDoGetSize(&w, &h);
+ if (w >= minSize.x && h >= minSize.y)
+ {
+ gtk_window_resize(GTK_WINDOW(win->m_widget), w, h);
+ resized = true;
+ }
+ }
+ if (!resized)
+ {
+ // adjust overall size to match change in frame extents
+ win->m_width += diff.x;
+ win->m_height += diff.y;
+ if (win->m_width < 0) win->m_width = 0;
+ if (win->m_height < 0) win->m_height = 0;
+ if (!win->m_deferShow)
+ {
+ win->m_oldClientWidth = 0;
+ gtk_widget_queue_resize(win->m_wxwindow);
+ }
+ }
+ }
+ if (win->m_deferShow)