From ba06d6afbf2f242236a64870f23d4a4b54a71ae3 Mon Sep 17 00:00:00 2001 From: Luciano Montanaro Date: Tue, 30 Sep 2003 18:13:18 +0000 Subject: [PATCH] Fixed bug #46966 using the first of the suggested methods. The second part of the bug report does not seem to apply to any other decoration in CVS. Removed redundant copies of MouseEvents, since I were at it. svn path=/trunk/kdebase/kwin/; revision=255165 --- clients/b2/b2client.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/clients/b2/b2client.cpp b/clients/b2/b2client.cpp index 35d468f2dc..a97822d59f 100644 --- a/clients/b2/b2client.cpp +++ b/clients/b2/b2client.cpp @@ -171,7 +171,7 @@ void B2Button::drawButton(QPainter *p) } else{ if(client->isActive()){ - if(isOn() || isDown()) + if (isDown()) p->drawPixmap((width()-pDown->width())/2, (height()-pDown->height())/2, *pDown); else @@ -179,7 +179,7 @@ void B2Button::drawButton(QPainter *p) (height()-pNorm->height())/2, *pNorm); } else{ - if(isOn() || isDown()) + if (isDown()) p->drawPixmap((width()-pDown->width())/2, (height()-pDown->height())/2, *iDown); else @@ -209,16 +209,12 @@ void B2Button::setPixmaps(int button_id) void B2Button::mousePressEvent( QMouseEvent* e ) { last_button = e->button(); - QMouseEvent me ( e->type(), e->pos(), e->globalPos(), - LeftButton, e->state() ); - QButton::mousePressEvent(&me); + QButton::mousePressEvent(e); } void B2Button::mouseReleaseEvent( QMouseEvent* e ) { - QMouseEvent me ( e->type(), e->pos(), e->globalPos(), - LeftButton, e->state() ); - QButton::mouseReleaseEvent(&me); + QButton::mouseReleaseEvent(e); } // ===================================== @@ -775,7 +771,7 @@ void B2Client::titleMoveRel(int xdiff) void B2Client::desktopChange() { bool on = isOnAllDesktops(); - if (B2Button * b = button[BtnSticky]) { + if (B2Button *b = button[BtnSticky]) { b->setDown(on); QToolTip::remove(b); QToolTip::add(b, on ? i18n("Not On All Desktops") : i18n("On All Desktops"));