summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-05-17 20:51:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-17 22:08:12 +0200
commit50d8a8c321b17cf5311029467a37e5e163f2bf9c (patch)
treee6ce843b72c57f3207737083276016775da142c3
parent870f8bef3c52cca36afe4fcd48c1beec104082cb (diff)
fix is_double_buffered_window
after commit 9090dc1f3b27195f5defd35586ac79357992be21 Date: Mon Jan 18 18:27:19 2021 +0200 split OutputDevice from Window Change-Id: I495d12f2ce499efbc3a3b4a993066860d22690a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115718 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--vcl/source/outdev/gradient.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 3ba80a0cdc2b..1250654d372d 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -441,8 +441,8 @@ void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect,
bool OutputDevice::is_double_buffered_window() const
{
- const vcl::Window *pWindow = dynamic_cast<const vcl::Window*>(this);
- return pWindow && pWindow->SupportsDoubleBuffering();
+ auto pOwnerWindow = GetOwnerWindow();
+ return pOwnerWindow && pOwnerWindow->SupportsDoubleBuffering();
}
void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect,