diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-08-18 09:59:46 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-08-20 14:58:07 +0000 |
commit | 5c1b030d82dd9db2728724341db901d0bf680ba1 (patch) | |
tree | 8c40c22d2ed320a7b18cb2c5a28d08712b5ed699 | |
parent | 2a43a11b6580364c96d16ce8c6bfe5acd49652e5 (diff) |
tdf#93096 sw: fix selection with keyboard outside current view
Regression from commit c9175a1bd3249ad573ae6827bf19963a3ebe2fbc
(SwViewShell::ImplEndAction: avoid direct PaintDesktop(), 2015-07-03),
the problem is that while going via InvalidateWindows() is fine for the
double-buffering case, it has side effects when painting directly, so
revert back to the old code in that case.
Change-Id: Ib1e3b143f5cfe2c6ab8b102a1a2064900282f136
(cherry picked from commit 222f10e773ba51a19880be1b798990260c198147)
Reviewed-on: https://gerrit.libreoffice.org/17835
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit a56cda359b45a900d0b5d017693efccf3b5b2e59)
Reviewed-on: https://gerrit.libreoffice.org/17842
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index b934e76fc307..e3b76b29c915 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -405,7 +405,25 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) } if ( bPaint ) { - InvalidateWindows(aRect.SVRect()); + if (GetWin() && GetWin()->SupportsDoubleBuffering()) + InvalidateWindows(aRect.SVRect()); + else + { + // #i75172# begin DrawingLayer paint + // need to do begin/end DrawingLayer preparation for each single rectangle of the + // repaint region. I already tried to prepare only once for the whole Region. This + // seems to work (and does technically) but fails with transparent objects. Since the + // region given to BeginDarwLayers() defines the clip region for DrawingLayer paint, + // transparent objects in the single rectangles will indeed be painted multiple times. + DLPrePaint2(vcl::Region(aRect.SVRect())); + + if ( bPaintsFromSystem ) + PaintDesktop(*GetOut(), aRect); + pCurrentLayout->GetCurrShell()->InvalidateWindows(aRect.SVRect()); + + // #i75172# end DrawingLayer paint + DLPostPaint2(true); + } } else lcl_PaintTransparentFormControls(*this, aRect); // i#107365 |