From 8005bb6db6efb2e230525d89f333831fcef5e576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Sun, 22 Apr 2007 10:52:55 +0000 Subject: [PATCH] Limit the capturing region to the screen. svn path=/branches/work/kwin_composite/; revision=656772 --- effects/videorecord.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/effects/videorecord.cpp b/effects/videorecord.cpp index ac625d5df6..44d09aee46 100644 --- a/effects/videorecord.cpp +++ b/effects/videorecord.cpp @@ -64,7 +64,8 @@ void VideoRecordEffect::paintScreen( int mask, QRegion region, ScreenPaintData& { effects->paintScreen( mask, region, data ); if( client != NULL ) - capture_region = region; + capture_region = ( mask & ( PAINT_WINDOW_TRANSFORMED | PAINT_SCREEN_TRANSFORMED )) + ? QRect( 0, 0, displayWidth(), displayHeight()) : region; } void VideoRecordEffect::postPaintScreen() @@ -75,6 +76,7 @@ void VideoRecordEffect::postPaintScreen() #if 1 if( CapturyProcessRegionStart( client ) == CAPTURY_SUCCESS ) { + capture_region &= QRect( 0, 0, displayWidth(), displayHeight()); // limit to screen foreach( QRect r, capture_region.rects()) { int gly = displayHeight() - r.y() - r.height(); // opengl coords