Double-click to close is back.
svn path=/trunk/kdebase/kwin/; revision=174417
This commit is contained in:
parent
3b57952b03
commit
f374dba2f2
1 changed files with 16 additions and 4 deletions
|
@ -757,10 +757,22 @@ void GalliumClient::calcHiddenButtons()
|
|||
|
||||
void GalliumClient::menuButtonPressed()
|
||||
{
|
||||
QPoint menupoint ( button[BtnMenu]->rect().bottomLeft().x()-3,
|
||||
button[BtnMenu]->rect().bottomLeft().y()+2 );
|
||||
workspace()->showWindowMenu( button[BtnMenu]->mapToGlobal( menupoint ), this );
|
||||
button[BtnMenu]->setDown(false);
|
||||
static QTime* t = NULL;
|
||||
static GalliumClient* lastClient = NULL;
|
||||
if( t == NULL )
|
||||
t = new QTime;
|
||||
bool dbl = ( lastClient == this && t->elapsed() <= QApplication::doubleClickInterval());
|
||||
lastClient = this;
|
||||
t->start();
|
||||
if( !dbl )
|
||||
{
|
||||
QPoint menupoint ( button[BtnMenu]->rect().bottomLeft().x()-3,
|
||||
button[BtnMenu]->rect().bottomLeft().y()+2 );
|
||||
workspace()->showWindowMenu( button[BtnMenu]->mapToGlobal( menupoint ), this );
|
||||
button[BtnMenu]->setDown(false);
|
||||
}
|
||||
else
|
||||
closeWindow();
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue