[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Wed May 29 11:54:33 UTC 2019


 vcl/source/window/menubarwindow.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 2a1d0f3b926b6d7921849093b031f457db4cbc8a
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue May 21 12:27:17 2019 +0200
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Wed May 29 13:53:49 2019 +0200

    tdf#125413 vcl menu bar window: fix non-NWF background
    
    Windows (by default) and gtk3 paints its own background, but e.g. the
    Linux gen backend does not; so make sure that we not only copy from the
    buffer, but also initialize it.
    
    This restores the gradient background of the main menu with the Linux
    gen backend.
    
    (cherry picked from commit a2da909adfe07d5a093485cc28283f5c100946ba)
    
    Change-Id: I5ce8cc734f64bc1d57d343caf22071e6aa63a69f
    Reviewed-on: https://gerrit.libreoffice.org/72685
    Tested-by: Xisco Faulí <xiscofauli at libreoffice.org>
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 66444c082153..ccee51895c3e 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -920,6 +920,9 @@ void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Recta
     // Make sure that all actual rendering happens in one go to avoid flicker.
     ScopedVclPtrInstance<VirtualDevice> pBuffer;
     pBuffer->SetOutputSizePixel(aOutputSize, false);
+    // Copy the current state to the buffer.
+    pBuffer->DrawOutDev(Point(0, 0), GetOutputSizePixel(), Point(0, 0), GetOutputSizePixel(),
+                        rRenderContext);
 
     if (rRenderContext.IsNativeControlSupported(ControlType::Menubar, ControlPart::Entire))
     {
@@ -963,6 +966,7 @@ void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Recta
         pBuffer->Pop();
     }
 
+    // Copy the current state from the buffer.
     rRenderContext.DrawOutDev(Point(0, 0), GetOutputSizePixel(), Point(0, 0), GetOutputSizePixel(),
                               *pBuffer);
 }


More information about the Libreoffice-commits mailing list