[Libreoffice-commits] core.git: sfx2/source vcl/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Fri Aug 30 15:51:05 UTC 2019
sfx2/source/dialog/backingcomp.cxx | 10 ----------
vcl/source/control/button.cxx | 10 ----------
vcl/source/window/bufferdevice.cxx | 2 --
vcl/source/window/bufferdevice.hxx | 1 -
vcl/source/window/menubarwindow.cxx | 16 ++--------------
5 files changed, 2 insertions(+), 37 deletions(-)
New commits:
commit a40fbd031de042b0181dc5570164ae8ce0abb0f1
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Fri Aug 30 17:00:46 2019 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Aug 30 17:50:14 2019 +0200
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 at collabora.com>
Tested-by: Jenkins
diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx
index dea33fa1698f..eb29da210fcc 100644
--- a/sfx2/source/dialog/backingcomp.cxx
+++ b/sfx2/source/dialog/backingcomp.cxx
@@ -576,12 +576,6 @@ void SAL_CALL BackingComp::dispose()
{
m_xWindow->removeEventListener(this);
m_xWindow->removeKeyListener(this);
- VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(m_xWindow);
- auto pBack = dynamic_cast<BackingWindow*>(pWindow.get());
- if (pBack)
- {
- pBack->RequestDoubleBuffering(false);
- }
m_xWindow.clear();
}
@@ -666,10 +660,6 @@ void SAL_CALL BackingComp::initialize( /*IN*/ const css::uno::Sequence< css::uno
// create the component window
VclPtr<vcl::Window> pParent = VCLUnoHelper::GetWindow(xParentWindow);
VclPtr<vcl::Window> pWindow = VclPtr<BackingWindow>::Create(pParent);
- if (!pWindow->IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Focus))
- {
- pWindow->RequestDoubleBuffering(true);
- }
m_xWindow = VCLUnoHelper::GetInterface(pWindow);
if (!m_xWindow.is())
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index ad70daed0d15..ffad8810efac 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1080,13 +1080,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
aInRect, bDrawMenuSep, nButtonStyle);
if (HasFocus())
- {
ShowFocus(ImplGetFocusRect());
- if (SupportsDoubleBuffering())
- {
- rRenderContext.Invert(ImplGetFocusRect(), InvertFlags::TrackFrame);
- }
- }
}
if (!bNativeOK)
@@ -1113,10 +1107,6 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
if (HasFocus())
{
ShowFocus(ImplGetFocusRect());
- if (SupportsDoubleBuffering())
- {
- rRenderContext.Invert(ImplGetFocusRect(), InvertFlags::TrackFrame);
- }
}
}
}
diff --git a/vcl/source/window/bufferdevice.cxx b/vcl/source/window/bufferdevice.cxx
index ccdf5415fb6b..d1480588d48f 100644
--- a/vcl/source/window/bufferdevice.cxx
+++ b/vcl/source/window/bufferdevice.cxx
@@ -31,8 +31,6 @@ BufferDevice::~BufferDevice()
vcl::RenderContext* BufferDevice::operator->() { return m_pBuffer.get(); }
vcl::RenderContext& BufferDevice::operator*() { return *m_pBuffer; }
-
-vcl::RenderContext& BufferDevice::GetRenderContext() { return *m_pBuffer; }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/bufferdevice.hxx b/vcl/source/window/bufferdevice.hxx
index 75e89f92e657..26bf28e615fa 100644
--- a/vcl/source/window/bufferdevice.hxx
+++ b/vcl/source/window/bufferdevice.hxx
@@ -25,7 +25,6 @@ class BufferDevice
public:
BufferDevice(const VclPtr<vcl::Window>& pWindow, vcl::RenderContext& rRenderContext);
~BufferDevice();
- vcl::RenderContext& GetRenderContext();
vcl::RenderContext* operator->();
vcl::RenderContext& operator*();
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))
{
More information about the Libreoffice-commits
mailing list