diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-08 15:31:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-07-08 16:43:41 +0100 |
commit | 56f79350d2556d4c8336e768f33d02423b0a9fbb (patch) | |
tree | 950798ccd77e24a27ab7c648186836ad02ce8cd0 | |
parent | 3ec79d5a00ff71366c31e7f4b8b6ae9f8d80e820 (diff) |
ScrollFlags::NoWindowInvalidate never set
Change-Id: Ib1f0f85fc6c1b68fcebdf94635536a9bdba06d93
-rw-r--r-- | include/vcl/window.hxx | 7 | ||||
-rw-r--r-- | vcl/source/window/paint.cxx | 22 |
2 files changed, 14 insertions, 15 deletions
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 87d1e70de14e..379d7e035ef7 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -256,13 +256,12 @@ enum class ScrollFlags NoChildren = 0x0004, NoErase = 0x0008, NoInvalidate = 0x0010, - NoWindowInvalidate = 0x0020, - UseClipRegion = 0x0040, - Update = 0x0080, + UseClipRegion = 0x0020, + Update = 0x0040, }; namespace o3tl { - template<> struct typed_flags<ScrollFlags> : is_typed_flags<ScrollFlags, 0x00ff> {}; + template<> struct typed_flags<ScrollFlags> : is_typed_flags<ScrollFlags, 0x007f> {}; } // Flags for ParentClipMode diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index 9a5a1ec2f5c7..a483d8d09fd9 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -1577,19 +1577,19 @@ void Window::ImplScroll( const Rectangle& rRect, aInvalidateRegion.Move( bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll ); bErase = true; } - if ( !(nFlags & ScrollFlags::NoWindowInvalidate) ) + + Rectangle aDestRect(aRectMirror); + aDestRect.Move(bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll); + vcl::Region aWinInvalidateRegion(aRectMirror); + if (!SupportsDoubleBuffering()) { - Rectangle aDestRect( aRectMirror ); - aDestRect.Move( bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll ); - vcl::Region aWinInvalidateRegion( aRectMirror ); - if (!SupportsDoubleBuffering()) - // There will be no CopyArea() call below, so invalidate the - // whole visible area, not only the smaller one that was just - // scrolled in. - aWinInvalidateRegion.Exclude(aDestRect); - - aInvalidateRegion.Union( aWinInvalidateRegion ); + // There will be no CopyArea() call below, so invalidate the + // whole visible area, not only the smaller one that was just + // scrolled in. + aWinInvalidateRegion.Exclude(aDestRect); } + + aInvalidateRegion.Union( aWinInvalidateRegion ); } Point aPoint( mnOutOffX, mnOutOffY ); |