diff --git a/kcmkwin/kwindecoration/preview.cpp b/kcmkwin/kwindecoration/preview.cpp index 1e95c6cbea..8284127a53 100644 --- a/kcmkwin/kwindecoration/preview.cpp +++ b/kcmkwin/kwindecoration/preview.cpp @@ -85,9 +85,11 @@ bool KDecorationPreview::recreateDecoration( KDecorationPlugins* plugins ) } positionPreviews(); - deco[Inactive]->widget()->show(); - deco[Active]->widget()->show(); + //deco[Inactive]->widget()->show(); + //deco[Active]->widget()->show(); + //deco[Inactive]->widget()->render( this, deco[Inactive]->widget()->mapToParent( QPoint(0,0) ) ); + return true; } @@ -104,6 +106,13 @@ void KDecorationPreview::disablePreview() no_preview->show(); } +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) ) ); +} + void KDecorationPreview::resizeEvent( QResizeEvent* e ) { QWidget::resizeEvent( e ); diff --git a/kcmkwin/kwindecoration/preview.h b/kcmkwin/kwindecoration/preview.h index 13481dbb32..4e04a10489 100644 --- a/kcmkwin/kwindecoration/preview.h +++ b/kcmkwin/kwindecoration/preview.h @@ -55,6 +55,7 @@ class KDecorationPreview void setTempBorderSize(KDecorationPlugins* plugin, KDecorationDefines::BorderSize size); void setTempButtons(KDecorationPlugins* plugin, bool customEnabled, const QString &left, const QString &right); protected: + virtual void paintEvent( QPaintEvent* ); virtual void resizeEvent( QResizeEvent* ); private: void positionPreviews();