summaryrefslogtreecommitdiff
path: root/vcl/source/window/menubarwindow.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-08-30 17:00:46 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-08-30 17:50:14 +0200
commita40fbd031de042b0181dc5570164ae8ce0abb0f1 (patch)
treef95b431ee61c16c95ced0e5d9f926d8165413923 /vcl/source/window/menubarwindow.cxx
parente607beeed1b391ee2a622494700d78d68dd2868f (diff)
tdf#127211 Revert "tdf#71087 sfx2: avoid flicker in the start center"
This reverts commit d5c7657c541c1f6d17bfe5e605594c235eecfcdb. By the time I created that, I forgot to test the case when there are no recent documents. I'm not exactly sure how to fix that, so just go back to the old behavior for now (trading a regression for a normal bug). Change-Id: I8abc251a3e6506ca17429ba106e2dd70fff31556 Reviewed-on: https://gerrit.libreoffice.org/78301 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'vcl/source/window/menubarwindow.cxx')
-rw-r--r--vcl/source/window/menubarwindow.cxx16
1 files changed, 2 insertions, 14 deletions
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index e9d93765bb9a..040385d5cf9b 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -913,20 +913,8 @@ void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Recta
return;
}
- vcl::RenderContext* pBuffer = nullptr;
- std::unique_ptr<vcl::BufferDevice> pBufferDevice;
- if (SupportsDoubleBuffering())
- {
- // No need to buffer twice, just set up the background.
- pBuffer = &rRenderContext;
- pBuffer->Erase(tools::Rectangle(Point(GetOutOffXPixel(), GetOutOffYPixel()), GetOutputSizePixel()));
- }
- else
- {
- // Make sure that all actual rendering happens in one go to avoid flicker.
- pBufferDevice.reset(new vcl::BufferDevice(this, rRenderContext));
- pBuffer = &pBufferDevice->GetRenderContext();
- }
+ // Make sure that all actual rendering happens in one go to avoid flicker.
+ vcl::BufferDevice pBuffer(this, rRenderContext);
if (rRenderContext.IsNativeControlSupported(ControlType::Menubar, ControlPart::Entire))
{