From fa39ba305aa1339ce784ef2dcb4f9701e6c5bb4c Mon Sep 17 00:00:00 2001 From: Lennart Kudling Date: Sat, 26 May 2001 20:56:20 +0000 Subject: [PATCH] it basically works now svn path=/trunk/kdebase/kwin/; revision=98909 --- clients/mwm/mwmclient.cpp | 9 ++++++--- clients/mwm/mwmclient.h | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/clients/mwm/mwmclient.cpp b/clients/mwm/mwmclient.cpp index 6028c3fb6e..3735b33172 100644 --- a/clients/mwm/mwmclient.cpp +++ b/clients/mwm/mwmclient.cpp @@ -13,8 +13,8 @@ using namespace KWinInternal; -const int s_frameWidth = 5; -const int s_buttonSize = 19; +static const int s_frameWidth = 5; +static const int s_buttonSize = 19; MwmButton::MwmButton( MwmClient* parent, const char* name, int btnType ) @@ -137,9 +137,12 @@ void MwmClient::menuButtonPressed() t = new QTime; if ( tc != this || t->elapsed() > QApplication::doubleClickInterval() ) + { workspace()->clientPopup( this )->popup( button[BtnMenu]->mapToGlobal( button[BtnMenu]->rect().bottomLeft() ) ); + button[BtnMenu]->animateClick(); + } else closeWindow(); @@ -397,7 +400,7 @@ void MwmClient::paintEvent( QPaintEvent* ) p.setPen( options->color( Options::Font, isActive() ) ); p.drawText( trect.x() + 3, - trect.y() - 1, + trect.y(), trect.width() - 6, trect.height(), AlignHCenter | AlignVCenter, caption() ); diff --git a/clients/mwm/mwmclient.h b/clients/mwm/mwmclient.h index fb137ffc21..519fd87fa5 100644 --- a/clients/mwm/mwmclient.h +++ b/clients/mwm/mwmclient.h @@ -20,9 +20,10 @@ class MwmButton : public QButton public: MwmButton( MwmClient* parent=0, const char* name=0, int btnType=0 ); void reset(); + protected: - virtual void drawButton(QPainter *p); - void drawButtonLabel(QPainter *){;} + virtual void drawButton( QPainter *p ); + private: MwmClient* m_parent; int m_btnType;