- // inform the parent to perform the move
- wxASSERT_MSG(m_parent && m_parent->m_wxwindow,
- "the parent window has no client area?");
- WX_PIZZA(m_parent->m_wxwindow)->move(m_widget, x, y);
+ // With GTK3, gtk_widget_queue_resize() is ignored while a size-allocate
+ // is in progress. This situation is common in wxWidgets, since
+ // size-allocate can generate wxSizeEvent and size event handlers often
+ // call SetSize(), directly or indirectly. Work around this by deferring
+ // the queue-resize until after size-allocate processing is finished.
+ if (g_slist_find(gs_queueResizeList, m_widget) == NULL)
+ {
+ if (gs_queueResizeList == NULL)
+ g_idle_add_full(GTK_PRIORITY_RESIZE, queue_resize, NULL, NULL);
+ gs_queueResizeList = g_slist_prepend(gs_queueResizeList, m_widget);
+ g_object_add_weak_pointer(G_OBJECT(m_widget), &gs_queueResizeList->data);
+ }