diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index 5e31b440a6..404c5d4f08 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -1251,7 +1251,8 @@ namespace Oxygen if( widget() == object ) state = mouseReleaseEvent( static_cast< QMouseEvent* >( event ) ); else if( OxygenButton *btn = qobject_cast< OxygenButton* >( object ) ) { - if( static_cast< QMouseEvent* >( event )->button() == Qt::LeftButton ) + QMouseEvent* mouseEvent( static_cast< QMouseEvent* >( event ) ); + if( mouseEvent->button() == Qt::LeftButton && btn->rect().contains( mouseEvent->pos() ) ) { state = closeItem( btn ); } }