summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-06-04 14:11:33 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-06-04 14:59:54 +0200
commit4dadbff74eff5f8ad00df99c659f8a2b914e09a1 (patch)
treed1c63067f0a3344387a0f53a28bb87e477cc0ab4 /sc
parentee6dd4d39e9169283e74a9210ace0b8f7f897da4 (diff)
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). Change-Id: I77aa951e14db668166dc8757e36c037ee98243bf Reviewed-on: https://gerrit.libreoffice.org/73441 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx3
-rw-r--r--sc/source/ui/view/gridwin.cxx6
2 files changed, 9 insertions, 0 deletions
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));