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

New commits:
commit ec77a2ed0283cb3446f6e352fc329afd3dfb785c
Author:     Jan-Marek Glogowski <glo...@fbihome.de>
AuthorDate: Mon Jul 19 23:28:47 2021 +0200
Commit:     Jan-Marek Glogowski <glo...@fbihome.de>
CommitDate: Tue Jul 20 15:03:07 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.wegh...@posteo.de>

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);
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to