diff --git a/clients/oxygen/oxygenbutton.cpp b/clients/oxygen/oxygenbutton.cpp index da4e3c44b4..ab0b5fc622 100644 --- a/clients/oxygen/oxygenbutton.cpp +++ b/clients/oxygen/oxygenbutton.cpp @@ -187,6 +187,8 @@ namespace Oxygen if( _client.compositingActive() ) { + return; + QPainter painter( this ); painter.setRenderHints(QPainter::Antialiasing); painter.setClipRegion( event->region() ); diff --git a/clients/oxygen/oxygenbutton.h b/clients/oxygen/oxygenbutton.h index 3268795a90..92ba1b6ecd 100644 --- a/clients/oxygen/oxygenbutton.h +++ b/clients/oxygen/oxygenbutton.h @@ -90,6 +90,13 @@ namespace Oxygen //@} + //! render buttn to provided painter + void paint(QPainter& ); + + // parent update + void parentUpdate( void ) + { parentWidget()->update( geometry().adjusted( -1, -1, 1, 1 ) ); } + protected: //! press event @@ -110,9 +117,6 @@ namespace Oxygen //! paint void paintEvent( QPaintEvent* ); - //! render buttn to provided painter - void paint(QPainter& ); - //! draw icon void drawIcon( QPainter* ); diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index c3e826e676..b9248211d9 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -1394,6 +1394,24 @@ namespace Oxygen painter.setClipRegion( event->region() ); paint( painter ); + // update buttons + if( compositingActive() ) + { + QList buttons( widget()->findChildren() ); + foreach( Button* button, buttons ) + { + if( event->rect().intersects( button->geometry() ) ) + { + painter.save(); + painter.setViewport( button->geometry() ); + painter.setWindow( button->rect() ); + button->paint( painter ); + painter.restore(); + } + } + } + + } else { {