Kaydet (Commit) 4dadbff7 authored tarafından Miklos Vajna's avatar Miklos Vajna

tdf#101086 sc autofilter popup: avoid flicker

Regression from commit a4cb27f6
(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/73441Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
üst ee6dd4d3
......@@ -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 )
......
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment