From 00c9b04028e5e2ed838313389f74c61b09caee2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 16 Aug 2020 21:04:45 +0100 Subject: [PATCH] tdf#135743 ignore size-allocations triggered by an embedded SalObject MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit getting configured, we already ignored them for painting, do the same for the size-requests it output from our internal configuring Change-Id: I4c0153535459b089ba6c31e3d9f09bfae2545806 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100824 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- vcl/unx/gtk3/gtk3gtkframe.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index df407459c569..bfc587d21579 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -2929,13 +2929,16 @@ gboolean GtkSalFrame::signalDraw(GtkWidget*, cairo_t *cr, gpointer frame) void GtkSalFrame::sizeAllocated(GtkWidget* pWidget, GdkRectangle *pAllocation, gpointer frame) { GtkSalFrame* pThis = static_cast(frame); + // ignore size-allocations that occur during configuring an embedded SalObject + if (pThis->m_bSalObjectSetPosSize) + return; pThis->maGeometry.nWidth = pAllocation->width; pThis->maGeometry.nHeight = pAllocation->height; bool bRealized = gtk_widget_get_realized(pWidget); if (bRealized) pThis->AllocateFrame(); pThis->CallCallbackExc( SalEvent::Resize, nullptr ); - if (bRealized && !pThis->m_bSalObjectSetPosSize) + if (bRealized) pThis->TriggerPaintEvent(); }