vcl/inc/unx/gtk/gtkframe.hxx | 2 ++ vcl/unx/gtk3/gtkframe.cxx | 7 ++++++- vcl/unx/gtk3/salnativewidgets-gtk.cxx | 3 +-- 3 files changed, 9 insertions(+), 3 deletions(-)
New commits: commit 7da5a688f47574f2e55c57d8efba5640bbc4e14f Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon May 24 12:51:41 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon May 24 16:30:54 2021 +0200 gtk[3|4] add a queue_draw to avoid GtkFixed cast Change-Id: I093b62f9530b28ae932338163606e78fca5752d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116057 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx index a9d3173f27a1..55b306827350 100644 --- a/vcl/inc/unx/gtk/gtkframe.hxx +++ b/vcl/inc/unx/gtk/gtkframe.hxx @@ -585,6 +585,8 @@ public: //which triggers the gsignals. bool CallCallbackExc(SalEvent nEvent, const void* pEvent) const; + // call gtk_widget_queue_draw on the drawing widget + void queue_draw(); static void KeyCodeToGdkKey(const vcl::KeyCode& rKeyCode, guint* pGdkKeyCode, GdkModifierType *pGdkModifiers); diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx index ba35080c9641..4ddbc637c51b 100644 --- a/vcl/unx/gtk3/gtkframe.cxx +++ b/vcl/unx/gtk3/gtkframe.cxx @@ -3536,6 +3536,11 @@ gboolean GtkSalFrame::signalConfigure(GtkWidget*, GdkEventConfigure* pEvent, gpo } #endif +void GtkSalFrame::queue_draw() +{ + gtk_widget_queue_draw(GTK_WIDGET(m_pFixedContainer)); +} + void GtkSalFrame::TriggerPaintEvent() { //Under gtk2 we can basically paint directly into the XWindow and on @@ -3553,7 +3558,7 @@ void GtkSalFrame::TriggerPaintEvent() SAL_INFO("vcl.gtk3", "force painting" << 0 << "," << 0 << " " << maGeometry.nWidth << "x" << maGeometry.nHeight); SalPaintEvent aPaintEvt(0, 0, maGeometry.nWidth, maGeometry.nHeight, true); CallCallbackExc(SalEvent::Paint, &aPaintEvt); - gtk_widget_queue_draw(GTK_WIDGET(m_pFixedContainer)); + queue_draw(); } void GtkSalFrame::DrawingAreaFocusInOut(SalEvent nEventType) diff --git a/vcl/unx/gtk3/salnativewidgets-gtk.cxx b/vcl/unx/gtk3/salnativewidgets-gtk.cxx index 68bf184673e9..fc4ddb0617e0 100644 --- a/vcl/unx/gtk3/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/salnativewidgets-gtk.cxx @@ -2783,8 +2783,7 @@ cairo::SurfaceSharedPtr GtkSalGraphics::CreateSurface(const OutputDevice& /*rRef void GtkSalGraphics::WidgetQueueDraw() const { //request gtk to sync the entire contents - GtkWidget *pWidget = GTK_WIDGET(mpFrame->getFixedContainer()); - gtk_widget_queue_draw(pWidget); + mpFrame->queue_draw(); } namespace { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits