since KDE2 does double-click-on-menu-is-close emulate this behaviour

as we do with other emulation styles. i AM closing BR#56922

svn path=/trunk/kdebase/kwin/; revision=236180
This commit is contained in:
Aaron J. Seigo 2003-07-08 21:06:03 +00:00
parent cafa67e113
commit 8dc1858ae3

View file

@ -1073,6 +1073,18 @@ Client::MousePosition KDEDefaultClient::mousePosition( const QPoint& p ) const
// Make sure the menu button follows double click conventions set in kcontrol
void KDEDefaultClient::menuButtonPressed()
{
static QTime t;
static KDEDefaultClient* lastClient = NULL;
bool dbl = ( lastClient == this && t.elapsed() <= QApplication::doubleClickInterval());
lastClient = this;
t.start();
if (dbl)
{
closeWindow();
return;
}
QPoint menupoint ( button[BtnMenu]->rect().bottomLeft().x()-1,
button[BtnMenu]->rect().bottomLeft().y()+2 );
workspace()->showWindowMenu( button[BtnMenu]->mapToGlobal( menupoint ), this );