From e2240a84271c8d5157db65a70d0e9a83e617f262 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Mon, 11 Jan 2010 18:32:56 +0000 Subject: [PATCH] Do not activate button pressed animation when no action is triggered when doing so (e.g right button press on Window-Close) svn path=/trunk/KDE/kdebase/workspace/; revision=1073152 --- clients/oxygen/oxygenbutton.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/clients/oxygen/oxygenbutton.cpp b/clients/oxygen/oxygenbutton.cpp index 625eec20bb..9d8c030e3f 100644 --- a/clients/oxygen/oxygenbutton.cpp +++ b/clients/oxygen/oxygenbutton.cpp @@ -160,8 +160,11 @@ namespace Oxygen void OxygenButton::mousePressEvent(QMouseEvent *e) { - status_ = Oxygen::Pressed; - update(); + if( type_ == ButtonMax || e->button() == Qt::LeftButton ) + { + status_ = Oxygen::Pressed; + update(); + } KCommonDecorationButton::mousePressEvent(e); }