Use new showWindowMenu() method

svn path=/trunk/kdebase/kwin/; revision=317024
This commit is contained in:
Luciano Montanaro 2004-06-02 10:12:26 +00:00
parent e034d686fd
commit ba446edb4b

View file

@ -1279,7 +1279,10 @@ void KDEDefaultClient::menuButtonPressed()
QPoint menupoint ( button[BtnMenu]->rect().bottomLeft().x()-1, QPoint menupoint ( button[BtnMenu]->rect().bottomLeft().x()-1,
button[BtnMenu]->rect().bottomLeft().y()+2 ); button[BtnMenu]->rect().bottomLeft().y()+2 );
KDecorationFactory* f = factory(); KDecorationFactory* f = factory();
showWindowMenu( button[BtnMenu]->mapToGlobal( menupoint )); QRect menuRect = button[BtnMenu]->rect();
QPoint menutop = button[BtnMenu]->mapToGlobal(menuRect.topLeft());
QPoint menubottom = button[BtnMenu]->mapToGlobal(menuRect.bottomRight());
showWindowMenu(QRect(menutop, menubottom));
if( !f->exists( this )) // 'this' was destroyed if( !f->exists( this )) // 'this' was destroyed
return; return;
button[BtnMenu]->setDown(false); button[BtnMenu]->setDown(false);