--Boundary-00=_Ok+iK2kQty1NVWZ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, attached patch fixes the clipping bug of the deco previews. Tested with Qt 4.5 and latest Qt 4.6. Please review, thanks. Christoph Feck (kdepepo) References: https://bugs.kde.org/show_bug.cgi?id=203842 --Boundary-00=_Ok+iK2kQty1NVWZ Content-Type: text/x-diff; charset="iso 8859-15"; name="kcmkwin.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kcmkwin.diff" Index: preview.cpp =================================================================== --- preview.cpp (revision 1013188) +++ preview.cpp (working copy) @@ -25,7 +25,7 @@ #include #include #include -//Added by qt3to4: +#include #include #include #include @@ -108,12 +108,22 @@ } void KDecorationPreview::paintEvent( QPaintEvent* e ) -{ - QWidget::paintEvent(e); - if( deco[Inactive] ) deco[Inactive]->widget()->render( this, deco[Inactive]->widget()->mapToParent( QPoint(0,0) ) ); - if( deco[Active] ) deco[Active]->widget()->render( this, deco[Active]->widget()->mapToParent( QPoint(0,0) ) ); -} + { + QPainter painter( this ); + QPoint delta = mapTo( window(), QPoint(0, 0) ); + if ( deco[Inactive] ) + { + QWidget *w = deco[Inactive]->widget(); + w->render( &painter, delta + w->mapToParent( QPoint(0, 0) ) ); + } + if ( deco[Active] ) + { + QWidget *w = deco[Active]->widget(); + w->render( &painter, delta + w->mapToParent( QPoint(0, 0) ) ); + } + } + void KDecorationPreview::resizeEvent( QResizeEvent* e ) { QWidget::resizeEvent( e ); --Boundary-00=_Ok+iK2kQty1NVWZ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kwin mailing list kwin@kde.org https://mail.kde.org/mailman/listinfo/kwin --Boundary-00=_Ok+iK2kQty1NVWZ--