diff options
-rw-r--r-- | vcl/source/control/combobox.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/imp_listbox.cxx | 9 | ||||
-rw-r--r-- | vcl/source/control/listbox.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/scrbar.cxx | 8 |
4 files changed, 19 insertions, 2 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 109c8374243b..31f8a0373f52 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -194,6 +194,8 @@ void ComboBox::ImplInit( vcl::Window* pParent, WinBits nStyle ) if( nStyle & WB_DROPDOWN ) { m_pImpl->m_pFloatWin = VclPtr<ImplListBoxFloatingWindow>::Create( this ); + if (!IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Focus)) + m_pImpl->m_pFloatWin->RequestDoubleBuffering(true); m_pImpl->m_pFloatWin->SetAutoWidth( true ); m_pImpl->m_pFloatWin->SetPopupModeEndHdl( LINK(m_pImpl.get(), ComboBox::Impl, ImplPopupModeEndHdl) ); diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index d6efa0e726ab..037fe20299f5 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -1910,7 +1910,14 @@ void ImplListBoxWindow::ImplDoPaint(vcl::RenderContext& rRenderContext, const to void ImplListBoxWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { - ImplDoPaint(rRenderContext, rRect); + if (SupportsDoubleBuffering()) + { + // This widget is explicitly double-buffered, so avoid partial paints. + tools::Rectangle aRect(Point(0, 0), GetOutputSizePixel()); + ImplDoPaint(rRenderContext, aRect); + } + else + ImplDoPaint(rRenderContext, rRect); } sal_uInt16 ImplListBoxWindow::GetDisplayLineCount() const diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx index 08855cef701d..e991978d71ab 100644 --- a/vcl/source/control/listbox.cxx +++ b/vcl/source/control/listbox.cxx @@ -119,6 +119,8 @@ void ListBox::ImplInit( vcl::Window* pParent, WinBits nStyle ) } mpFloatWin = VclPtr<ImplListBoxFloatingWindow>::Create( this ); + if (!IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Focus)) + mpFloatWin->RequestDoubleBuffering(true); mpFloatWin->SetAutoWidth( true ); mpFloatWin->SetPopupModeEndHdl( LINK( this, ListBox, ImplPopupModeEndHdl ) ); mpFloatWin->GetDropTarget()->addDropTargetListener(xDrop); diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index 19db246006b7..b20711d5e2f8 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -816,7 +816,13 @@ void ScrollBar::ImplDragThumb( const Point& rMousePos ) // When dragging in windows the repaint request gets starved so dragging // the scrollbar feels slower than it actually is. Let's force an immediate // repaint of the scrollbar. - ImplDraw(*this); + if (SupportsDoubleBuffering()) + { + Invalidate(); + Update(); + } + else + ImplDraw(*this); mnDelta = mnThumbPos-nOldPos; Scroll(); |