[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sc/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Tue Jun 4 17:40:33 UTC 2019


 sc/source/ui/cctrl/checklistmenu.cxx |    3 +++
 sc/source/ui/view/gridwin.cxx        |    6 ++++++
 2 files changed, 9 insertions(+)

New commits:
commit a92dd896b003ded7f5c4347a8370624ee9d77dbd
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue Jun 4 14:11:33 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Jun 4 19:39:57 2019 +0200

    tdf#101086 sc autofilter popup: avoid flicker
    
    Regression from commit a4cb27f61376d8f2d8faed0022c291af68d437bd
    (refactor ScMenuFloatingWindow to use RenderContext, 2015-05-14), the
    problem was that the change had two effects:
    
    1) It removed incremental rendering that now causes flicker.
    
    2) It added support for painting into a rendercontext, not on the window
    itself.
    
    Given that here a hierarchy of widgets have to be painted at once (to
    avoid flicker), use vcl::Window::RequestDoubleBuffering() instead of the
    much simpler vcl::BufferDevice.
    
    This improves the situation on Windows, but explicitly blacklist the
    focus rectangle case (gtk3) which is currently not compatible with this
    higher level double-buffering (and there we already have lower-level
    double-buffering anyway, similar to OpenGL).
    
    (cherry picked from commit 4dadbff74eff5f8ad00df99c659f8a2b914e09a1)
    
    Change-Id: I77aa951e14db668166dc8757e36c037ee98243bf
    Reviewed-on: https://gerrit.libreoffice.org/73451
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index e735ad62f7e6..8383738967a5 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1164,6 +1164,9 @@ void ScCheckListMenuWindow::selectCurrentMemberOnly(bool bSet)
     if (!pEntry)
         return;
     maChecks->CheckEntry(pEntry, bSet );
+
+    // Make sure all checkboxes are invalidated.
+    Invalidate();
 }
 
 IMPL_LINK( ScCheckListMenuWindow, ButtonHdl, Button*, pBtn, void )
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index ea51223772ec..e043cfc4d857 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -645,6 +645,12 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow)
 
     mpAutoFilterPopup.disposeAndClear();
     mpAutoFilterPopup.reset(VclPtr<ScCheckListMenuWindow>::Create(this, pDoc));
+
+    // Avoid flicker when hovering over the menu items.
+    if (!IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Focus))
+        // If NWF renders the focus rects itself, that breaks double-buffering.
+        mpAutoFilterPopup->RequestDoubleBuffering(true);
+
     if (comphelper::LibreOfficeKit::isActive())
         mpAutoFilterPopup->SetLOKNotifier(SfxViewShell::Current());
     mpAutoFilterPopup->setOKAction(new AutoFilterAction(this, AutoFilterMode::Normal));


More information about the Libreoffice-commits mailing list