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:
parent
cafa67e113
commit
8dc1858ae3
1 changed files with 25 additions and 13 deletions
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue