[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - vcl/inc vcl/qt5

Jan-Marek Glogowski (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 21 02:05:50 UTC 2021


 vcl/inc/qt5/Qt5Frame.hxx |    1 -
 vcl/qt5/Qt5Frame.cxx     |    8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)

New commits:
commit 83f91ec066614c3c40282913898083d317edd072
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Mon Jul 19 23:28:47 2021 +0200
Commit:     Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Wed Jul 21 04:05:09 2021 +0200

    tdf#143334 Qt5 don't reset buffer on style change
    
    This bug was "unveiled" by commit
    963f252cd1ea9c268a6ced68a3454b10cbee1a89 ("Qt5/KF5 get rid
    of unneeded own grahics handling"). I'm not sure why I ever came
    up with that code. Eventually we would need a paint event, but at
    least changing the theme correctly updated LO UI, so that seems
    to be handled correctly.
    
    Change-Id: I528b551180be184427eeeeeb2977e2b7da073ce6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119237
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    (cherry picked from commit ec77a2ed0283cb3446f6e352fc329afd3dfb785c)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119190

diff --git a/vcl/inc/qt5/Qt5Frame.hxx b/vcl/inc/qt5/Qt5Frame.hxx
index 62877e15e89a..f90936528399 100644
--- a/vcl/inc/qt5/Qt5Frame.hxx
+++ b/vcl/inc/qt5/Qt5Frame.hxx
@@ -83,7 +83,6 @@ class VCLPLUG_QT5_PUBLIC Qt5Frame : public QObject, public SalFrame
     bool m_bNullRegion;
 
     bool m_bGraphicsInUse;
-    bool m_bGraphicsInvalid;
     SalFrameStyleFlags m_nStyle;
     Qt5Frame* m_pParent;
     PointerStyle m_ePointerStyle;
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 36ce1222cb5e..6dc54d9408e3 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -105,7 +105,6 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags nStyle, bool bUseCairo)
     , m_bUseCairo(bUseCairo)
     , m_bNullRegion(true)
     , m_bGraphicsInUse(false)
-    , m_bGraphicsInvalid(false)
     , m_ePointerStyle(PointerStyle::Arrow)
     , m_pDragSource(nullptr)
     , m_pDropTarget(nullptr)
@@ -296,7 +295,7 @@ SalGraphics* Qt5Frame::AcquireGraphics()
 
     if (m_bUseCairo)
     {
-        if (!m_pSvpGraphics || m_bGraphicsInvalid)
+        if (!m_pSvpGraphics)
         {
             QSize aSize = m_pQWidget->size() * devicePixelRatioF();
             m_pSvpGraphics.reset(new Qt5SvpGraphics(this));
@@ -306,20 +305,18 @@ SalGraphics* Qt5Frame::AcquireGraphics()
                                        basegfx::B2IVector(aSize.width(), aSize.height()));
             cairo_surface_set_user_data(m_pSurface.get(), Qt5SvpGraphics::getDamageKey(),
                                         &m_aDamageHandler, nullptr);
-            m_bGraphicsInvalid = false;
         }
         return m_pSvpGraphics.get();
     }
     else
     {
-        if (!m_pQt5Graphics || m_bGraphicsInvalid)
+        if (!m_pQt5Graphics)
         {
             m_pQt5Graphics.reset(new Qt5Graphics(this));
             m_pQImage.reset(
                 new QImage(m_pQWidget->size() * devicePixelRatioF(), Qt5_DefaultFormat32));
             m_pQImage->fill(Qt::transparent);
             m_pQt5Graphics->ChangeQImage(m_pQImage.get());
-            m_bGraphicsInvalid = false;
         }
         return m_pQt5Graphics.get();
     }
@@ -1153,7 +1150,6 @@ void Qt5Frame::UpdateSettings(AllSettings& rSettings)
     style.SetShadowColor(toColor(pal.color(QPalette::Disabled, QPalette::WindowText)));
     style.SetDarkShadowColor(toColor(pal.color(QPalette::Inactive, QPalette::WindowText)));
 
-    m_bGraphicsInvalid = true;
     rSettings.SetStyleSettings(style);
 }
 


More information about the Libreoffice-commits mailing list