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

2021-09-25 Thread Jan-Marek Glogowski (via logerrit)
 vcl/inc/qt5/Qt5Frame.hxx  |7 ---
 vcl/inc/qt5/Qt5Widget.hxx |1 -
 vcl/qt5/Qt5Frame.cxx  |   12 +---
 vcl/qt5/Qt5Widget.cxx |   20 +---
 4 files changed, 6 insertions(+), 34 deletions(-)

New commits:
commit a928bab9fb68ff8fe45aca212b3c794799db31f6
Author: Jan-Marek Glogowski 
AuthorDate: Mon Sep 20 13:56:00 2021 +0200
Commit: Michael Weghorn 
CommitDate: Sat Sep 25 14:59:04 2021 +0200

tdf#144585 Qt5 restore old VCL popup handling

So while it works with X11, the Wayland situation seems much
worse. Eventually we want to use Qt::Popup as a window type,
because that implies special handling for Wayland, but the
additional private Qt mechanisms this implies conflict with VCL
handling, especially input + focus handling with ComboBox. I'll
re-check (again) how Qt itself implements this and maybe that
solution is adaptable to VCL.

This re-introduces the problem, that "DropDown/PopUp stays open
and in FG when changing app on Linux desktop (keyboard, ALT+TAB)",
original reported as part of tdf#143114, which is some kind of
kf5 catchall bug report.

Just revert for 7-2. Hope we find a better solution on master,
which can be backported later.

This revert includes:

- "tdf#144037 Qt5 just close popup with mouse outside"
  commit 7c1f4284562e905372b5c14b6017f1eb438f54b5
- "tdf#143580 Qt5 don't use Qt::Popup for FLOAT wins"
  commit ea2f19827db330a21c7962bdd13b1b838821bd4c
- "Qt5 fix Qt::Popup window handling"
  commit 7e6fee830116823b9cd8e46d6962df4ea2bc1ea6

Change-Id: Ibf56187e00232f6c75cdbbc82ce915f80214a136
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122356
Tested-by: Michael Weghorn 
Reviewed-by: Michael Weghorn 

diff --git a/vcl/inc/qt5/Qt5Frame.hxx b/vcl/inc/qt5/Qt5Frame.hxx
index 01b93ad3b825..ed82c2a7a8fb 100644
--- a/vcl/inc/qt5/Qt5Frame.hxx
+++ b/vcl/inc/qt5/Qt5Frame.hxx
@@ -210,7 +210,6 @@ public:
 inline bool CallCallback(SalEvent nEvent, const void* pEvent) const;
 
 void setInputLanguage(LanguageType);
-inline bool isPopup() const;
 };
 
 inline bool Qt5Frame::CallCallback(SalEvent nEvent, const void* pEvent) const
@@ -219,10 +218,4 @@ inline bool Qt5Frame::CallCallback(SalEvent nEvent, const 
void* pEvent) const
 return SalFrame::CallCallback(nEvent, pEvent);
 }
 
-inline bool Qt5Frame::isPopup() const
-{
-return ((m_nStyle & SalFrameStyleFlags::FLOAT)
-&& !(m_nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION));
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/qt5/Qt5Widget.hxx b/vcl/inc/qt5/Qt5Widget.hxx
index 60db1a306efd..7bf7ead6ae9a 100644
--- a/vcl/inc/qt5/Qt5Widget.hxx
+++ b/vcl/inc/qt5/Qt5Widget.hxx
@@ -75,7 +75,6 @@ class Qt5Widget : public QWidget
 
 void inputMethodEvent(QInputMethodEvent*) override;
 QVariant inputMethodQuery(Qt::InputMethodQuery) const override;
-static void closePopup();
 
 public:
 Qt5Widget(Qt5Frame& rFrame, Qt::WindowFlags f = Qt::WindowFlags());
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index a4c78d1b71a7..322f293828cd 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -144,13 +144,11 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags 
nStyle, bool bUseCairo)
 else if ((nStyle & SalFrameStyleFlags::FLOAT)
  && (nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION))
 aWinFlags |= Qt::Tool | Qt::FramelessWindowHint;
-else if (nStyle & SalFrameStyleFlags::TOOLTIP)
+else if (nStyle & (SalFrameStyleFlags::FLOAT | 
SalFrameStyleFlags::TOOLTIP))
 aWinFlags |= Qt::ToolTip;
-// Can't use Qt::Popup, because it grabs the input focus and generates
-// a focus-out event, reaking the compbo box. This used to map to
-// Qt::ToolTip, which doesn't feel that correct...
-else if (isPopup())
-aWinFlags = Qt::Widget | Qt::FramelessWindowHint | 
Qt::BypassWindowManagerHint;
+else if ((nStyle & SalFrameStyleFlags::FLOAT)
+ && !(nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION))
+aWinFlags |= Qt::Popup;
 else if (nStyle & SalFrameStyleFlags::TOOLWINDOW)
 aWinFlags |= Qt::Tool;
 // top level windows can't be transient in Qt, so make them dialogs, 
if they have a parent. At least
@@ -428,7 +426,7 @@ void Qt5Frame::Show(bool bVisible, bool bNoActivate)
 pSalInst->RunInMainThread([this, bVisible, bNoActivate]() {
 asChild()->setVisible(bVisible);
 asChild()->raise();
-if (!bNoActivate && !isPopup())
+if (!bNoActivate)
 {
 asChild()->activateWindow();
 asChild()->setFocus();
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx
index ca23138b5739..6cb548c0d028 100644
--- a/vcl/qt5/Qt5Widget.cxx
+++ b/vcl/qt5/Qt5Widget.cxx
@@ -46,7 +46,6 @@
 #include 
 #include 

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

2021-08-25 Thread Jan-Marek Glogowski (via logerrit)
 vcl/inc/qt5/Qt5Instance.hxx |3 +++
 vcl/qt5/Qt5Instance.cxx |8 +++-
 2 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 83be3b84228a67315882b65dc51cc86dc9d9afcc
Author: Jan-Marek Glogowski 
AuthorDate: Thu Aug 19 20:18:47 2021 +0200
Commit: Xisco Fauli 
CommitDate: Wed Aug 25 10:30:03 2021 +0200

tdf#143957 Qt5 always create an OpenGLContext

Nothing checks the result and a lot of code just uses it.

Change-Id: I1a672e98d42673fd684538ead831622f6a14e9f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120761
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit 0f7fed9249e988ca34c5401d746887822b4aa9ce)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120776
Reviewed-by: Xisco Fauli 

diff --git a/vcl/inc/qt5/Qt5Instance.hxx b/vcl/inc/qt5/Qt5Instance.hxx
index 41b9aca894d0..dc347021b9bb 100644
--- a/vcl/inc/qt5/Qt5Instance.hxx
+++ b/vcl/inc/qt5/Qt5Instance.hxx
@@ -133,7 +133,10 @@ public:
 virtual bool DoYield(bool bWait, bool bHandleAllCurrentEvents) override;
 virtual bool AnyInput(VclInputFlags nType) override;
 
+// so we fall back to the default abort, instead of duplicating it...
+#ifndef EMSCRIPTEN
 virtual OpenGLContext* CreateOpenGLContext() override;
+#endif
 
 virtual OUString GetConnectionIdentifier() override;
 
diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx
index bf8d52961960..432af5e6f718 100644
--- a/vcl/qt5/Qt5Instance.cxx
+++ b/vcl/qt5/Qt5Instance.cxx
@@ -245,6 +245,10 @@ Qt5Instance::Qt5Instance(std::unique_ptr& 
pQApp, bool bUseCairo)
 
 connect(QGuiApplication::inputMethod(), ::localeChanged, this,
 ::localeChanged);
+
+#ifdef EMSCRIPTEN
+m_bSupportsOpenGL = false;
+#endif
 }
 
 Qt5Instance::~Qt5Instance()
@@ -432,7 +436,9 @@ OUString Qt5Instance::GetConnectionIdentifier() { return 
OUString(); }
 
 void Qt5Instance::AddToRecentDocumentList(const OUString&, const OUString&, 
const OUString&) {}
 
-OpenGLContext* Qt5Instance::CreateOpenGLContext() { return nullptr; }
+#ifndef EMSCRIPTEN
+OpenGLContext* Qt5Instance::CreateOpenGLContext() { return new 
Qt5OpenGLContext; }
+#endif
 
 bool Qt5Instance::IsMainThread() const
 {


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

2021-07-30 Thread Jan-Marek Glogowski (via logerrit)
 vcl/inc/qt5/Qt5Frame.hxx  |7 +++
 vcl/inc/qt5/Qt5Widget.hxx |1 +
 vcl/qt5/Qt5Frame.cxx  |   10 ++
 vcl/qt5/Qt5Widget.cxx |   24 +---
 4 files changed, 31 insertions(+), 11 deletions(-)

New commits:
commit ea2f19827db330a21c7962bdd13b1b838821bd4c
Author: Jan-Marek Glogowski 
AuthorDate: Fri Jul 30 05:25:37 2021 +0200
Commit: Michael Weghorn 
CommitDate: Fri Jul 30 22:19:21 2021 +0200

tdf#143580 Qt5 don't use Qt::Popup for FLOAT wins

Main problem is, that Qt::Popup grabs the focus and therefore
generates a focus-out event for the combobox, which then closes
the just shown popup window. The grab happens inside QWidget
private code and there is no way around it. But instead of
"faking" Qt::Tooltip, this uses Qt::Widget with additional flags.

Regression from commit 7e6fee830116823b9cd8e46d6962df4ea2bc1ea6
("Qt5 fix Qt::Popup window handling").

Change-Id: Ia1f8e33d98f7ec36cf1ebc350886121dfaadd658
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119691
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit 9dcf5816c90e9819861332f11e014ef7b78e2fe7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119621
Reviewed-by: Michael Weghorn 

diff --git a/vcl/inc/qt5/Qt5Frame.hxx b/vcl/inc/qt5/Qt5Frame.hxx
index ed82c2a7a8fb..01b93ad3b825 100644
--- a/vcl/inc/qt5/Qt5Frame.hxx
+++ b/vcl/inc/qt5/Qt5Frame.hxx
@@ -210,6 +210,7 @@ public:
 inline bool CallCallback(SalEvent nEvent, const void* pEvent) const;
 
 void setInputLanguage(LanguageType);
+inline bool isPopup() const;
 };
 
 inline bool Qt5Frame::CallCallback(SalEvent nEvent, const void* pEvent) const
@@ -218,4 +219,10 @@ inline bool Qt5Frame::CallCallback(SalEvent nEvent, const 
void* pEvent) const
 return SalFrame::CallCallback(nEvent, pEvent);
 }
 
+inline bool Qt5Frame::isPopup() const
+{
+return ((m_nStyle & SalFrameStyleFlags::FLOAT)
+&& !(m_nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION));
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/qt5/Qt5Widget.hxx b/vcl/inc/qt5/Qt5Widget.hxx
index 7bf7ead6ae9a..60db1a306efd 100644
--- a/vcl/inc/qt5/Qt5Widget.hxx
+++ b/vcl/inc/qt5/Qt5Widget.hxx
@@ -75,6 +75,7 @@ class Qt5Widget : public QWidget
 
 void inputMethodEvent(QInputMethodEvent*) override;
 QVariant inputMethodQuery(Qt::InputMethodQuery) const override;
+static void closePopup();
 
 public:
 Qt5Widget(Qt5Frame& rFrame, Qt::WindowFlags f = Qt::WindowFlags());
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 02032d149d29..a4c78d1b71a7 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -146,9 +146,11 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags 
nStyle, bool bUseCairo)
 aWinFlags |= Qt::Tool | Qt::FramelessWindowHint;
 else if (nStyle & SalFrameStyleFlags::TOOLTIP)
 aWinFlags |= Qt::ToolTip;
-else if ((nStyle & SalFrameStyleFlags::FLOAT)
- && !(nStyle & SalFrameStyleFlags::OWNERDRAWDECORATION))
-aWinFlags |= Qt::Popup;
+// Can't use Qt::Popup, because it grabs the input focus and generates
+// a focus-out event, reaking the compbo box. This used to map to
+// Qt::ToolTip, which doesn't feel that correct...
+else if (isPopup())
+aWinFlags = Qt::Widget | Qt::FramelessWindowHint | 
Qt::BypassWindowManagerHint;
 else if (nStyle & SalFrameStyleFlags::TOOLWINDOW)
 aWinFlags |= Qt::Tool;
 // top level windows can't be transient in Qt, so make them dialogs, 
if they have a parent. At least
@@ -426,7 +428,7 @@ void Qt5Frame::Show(bool bVisible, bool bNoActivate)
 pSalInst->RunInMainThread([this, bVisible, bNoActivate]() {
 asChild()->setVisible(bVisible);
 asChild()->raise();
-if (!bNoActivate)
+if (!bNoActivate && !isPopup())
 {
 asChild()->activateWindow();
 asChild()->setFocus();
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx
index ebb11cef51ff..864701340ad3 100644
--- a/vcl/qt5/Qt5Widget.cxx
+++ b/vcl/qt5/Qt5Widget.cxx
@@ -46,6 +46,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -179,11 +180,10 @@ void Qt5Widget::handleMouseButtonEvent(const Qt5Frame& 
rFrame, const QMouseEvent
 
 void Qt5Widget::mousePressEvent(QMouseEvent* pEvent)
 {
-if ((windowFlags() & Qt::Popup)
-&& !geometry().translated(geometry().topLeft() * 
-1).contains(pEvent->pos()))
-close();
-else
-handleMousePressEvent(m_rFrame, pEvent);
+handleMousePressEvent(m_rFrame, pEvent);
+if (m_rFrame.isPopup()
+|| !geometry().translated(geometry().topLeft() * 
-1).contains(pEvent->pos()))
+closePopup();
 }
 
 void Qt5Widget::mouseReleaseEvent(QMouseEvent* pEvent)
@@ -593,10 +593,21 @@ void Qt5Widget::keyReleaseEvent(QKeyEvent* 

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

2021-07-20 Thread Jan-Marek Glogowski (via logerrit)
 vcl/inc/qt5/Qt5Frame.hxx |1 
 vcl/qt5/Qt5Frame.cxx |3 +
 vcl/qt5/Qt5Widget.cxx|   81 +++
 3 files changed, 85 insertions(+)

New commits:
commit 289ed73a2359f6221ca36c61cf96e4f4b72f61cc
Author: Jan-Marek Glogowski 
AuthorDate: Mon Jul 19 15:17:53 2021 +0200
Commit: Michael Weghorn 
CommitDate: Wed Jul 21 04:06:02 2021 +0200

tdf#143298 Qt5 send SalEvent::KeyModChange events

I originally omitted this in the Qt implementation, as I couldn't
find any non-working use case.

The implementation got a bit hacky, because Qt doesn't have a non-
native way to identify different L/R modifier keys, so we must
process the X11/xkb keycode ourself, which obviously won't work on
Wayland... but most times this is not relevant, so the default
modifier notification may be good enough.

P.S. it's basically the same code then X11 and Gtk...

Change-Id: I37fbfde4a33a966b6017f3e0c280e2c7ea91e4db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119235
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit 862fdb98ca271b60a831cd5420fd16d5f9c1c747)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119191

diff --git a/vcl/inc/qt5/Qt5Frame.hxx b/vcl/inc/qt5/Qt5Frame.hxx
index f90936528399..ed82c2a7a8fb 100644
--- a/vcl/inc/qt5/Qt5Frame.hxx
+++ b/vcl/inc/qt5/Qt5Frame.hxx
@@ -102,6 +102,7 @@ class VCLPLUG_QT5_PUBLIC Qt5Frame : public QObject, public 
SalFrame
 
 #if QT5_USING_X11
 ScreenSaverInhibitor m_ScreenSaverInhibitor;
+ModKeyFlags m_nKeyModifiers;
 #endif
 
 LanguageType m_nInputLanguage;
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 6dc54d9408e3..322f293828cd 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -113,6 +113,9 @@ Qt5Frame::Qt5Frame(Qt5Frame* pParent, SalFrameStyleFlags 
nStyle, bool bUseCairo)
 , m_bDefaultPos(true)
 , m_bFullScreen(false)
 , m_bFullScreenSpanAll(false)
+#if QT5_USING_X11
+, m_nKeyModifiers(ModKeyFlags::NONE)
+#endif
 , m_nInputLanguage(LANGUAGE_DONTKNOW)
 {
 Qt5Instance* pInst = static_cast(GetSalData()->m_pInstance);
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx
index a2bf8fe6472d..2e97132f5e75 100644
--- a/vcl/qt5/Qt5Widget.cxx
+++ b/vcl/qt5/Qt5Widget.cxx
@@ -52,6 +52,11 @@
 #include 
 #include 
 
+#if QT5_USING_X11
+#define XK_MISCELLANY
+#include 
+#endif
+
 using namespace com::sun::star;
 
 void Qt5Widget::paintEvent(QPaintEvent* pEvent)
@@ -444,6 +449,82 @@ bool Qt5Widget::handleKeyEvent(Qt5Frame& rFrame, const 
QWidget& rWidget, QKeyEve
 return true;
 }
 
+if (nCode == 0)
+{
+sal_uInt16 nModCode = GetKeyModCode(pEvent->modifiers());
+SalKeyModEvent aModEvt;
+aModEvt.mbDown = eState == ButtonKeyState::Pressed;
+aModEvt.mnModKeyCode = ModKeyFlags::NONE;
+
+#if QT5_USING_X11
+if (QGuiApplication::platformName() == "xcb")
+{
+// pressing just the ctrl key leads to a keysym of XK_Control but
+// the event state does not contain ControlMask. In the release
+// event it's the other way round: it does contain the Control 
mask.
+// The modifier mode therefore has to be adapted manually.
+ModKeyFlags nExtModMask = ModKeyFlags::NONE;
+sal_uInt16 nModMask = 0;
+switch (pEvent->nativeVirtualKey())
+{
+case XK_Control_L:
+nExtModMask = ModKeyFlags::LeftMod1;
+nModMask = KEY_MOD1;
+break;
+case XK_Control_R:
+nExtModMask = ModKeyFlags::RightMod1;
+nModMask = KEY_MOD1;
+break;
+case XK_Alt_L:
+nExtModMask = ModKeyFlags::LeftMod2;
+nModMask = KEY_MOD2;
+break;
+case XK_Alt_R:
+nExtModMask = ModKeyFlags::RightMod2;
+nModMask = KEY_MOD2;
+break;
+case XK_Shift_L:
+nExtModMask = ModKeyFlags::LeftShift;
+nModMask = KEY_SHIFT;
+break;
+case XK_Shift_R:
+nExtModMask = ModKeyFlags::RightShift;
+nModMask = KEY_SHIFT;
+break;
+// Map Meta/Super keys to MOD3 modifier on all Unix systems
+// except macOS
+case XK_Meta_L:
+case XK_Super_L:
+nExtModMask = ModKeyFlags::LeftMod3;
+nModMask = KEY_MOD3;
+break;
+case XK_Meta_R:
+case XK_Super_R:
+nExtModMask = ModKeyFlags::RightMod3;
+nModMask = KEY_MOD3;
+break;
+ 

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

2021-07-20 Thread Jan-Marek Glogowski (via logerrit)
 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 
AuthorDate: Mon Jul 19 23:28:47 2021 +0200
Commit: Michael Weghorn 
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: I528b551180be184427eb2977e2b7da073ce6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119237
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
(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(),
 _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