From 84ae6d018b94ae7c2690328664a490ea74157aa4 Mon Sep 17 00:00:00 2001 From: Karol Szwed Date: Sat, 8 Sep 2001 10:45:49 +0000 Subject: [PATCH] - Fixing the menu button so that it doesn't show a toolbar button with a dropdown menu extension arrow as provided by qt3. svn path=/trunk/kdebase/kwin/; revision=113676 --- clients/kde1/kde1client.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/clients/kde1/kde1client.cpp b/clients/kde1/kde1client.cpp index 687299d319..0b22377e0a 100644 --- a/clients/kde1/kde1client.cpp +++ b/clients/kde1/kde1client.cpp @@ -289,9 +289,6 @@ StdClient::StdClient( Workspace *ws, WId w, QWidget *parent, const char *name ) button[0]->setIconSet( miniIcon() ); connect( button[0], SIGNAL( pressed() ), this, SLOT( menuButtonPressed() ) ); - button[0]->setPopupDelay( 0 ); - button[0]->setPopup( workspace()->clientPopup( this ) ); - button[1]->setIconSet(isSticky() ? isActive() ? *pindown_pix : *dis_pindown_pix : isActive() ? *pinup_pix : *dis_pinup_pix ); connect( button[1], SIGNAL( clicked() ), this, ( SLOT( toggleSticky() ) ) ); @@ -439,11 +436,17 @@ void StdClient::menuButtonPressed() t = new QTime; if ( tc != this || t->elapsed() > QApplication::doubleClickInterval() ) - button[0]->setPopup( workspace()->clientPopup( this ) ); - else { - button[0]->setPopup( 0 ); + { + QPoint menupoint ( button[0]->rect().bottomLeft().x()-1, + button[0]->rect().bottomLeft().y()+2 ); + workspace()->clientPopup(this)->popup( + button[0]->mapToGlobal( menupoint )); + + // Animate the click when the menu button is pressed + button[0]->animateClick(); + } else closeWindow(); - } + t->start(); tc = this; }