Use the new showWindowMenu() method.

svn path=/trunk/kdebase/kwin/; revision=317047
This commit is contained in:
Luciano Montanaro 2004-06-02 11:41:14 +00:00
parent ba446edb4b
commit e36514f2b3

View file

@ -816,10 +816,14 @@ void RedmondDeco::menuButtonPressed()
lastClient = this;
t->start();
if (!dbl) {
QPoint menupoint(button[BtnMenu]->rect().bottomLeft().x()-3,
button[BtnMenu]->rect().bottomLeft().y()+4);
QRect menuRect = button[BtnMenu]->rect();
QPoint menuTop = QPoint(menuRect.topLeft().x()-3,
menuRect.topLeft().y());
QPoint menuBottom = QPoint(menuRect.bottomRight().x()+3,
menuRect.bottomRight().y()+4);
KDecorationFactory* f = factory();
showWindowMenu(button[BtnMenu]->mapToGlobal(menupoint));
showWindowMenu(QRect(button[BtnMenu]->mapToGlobal(menuTop),
button[BtnMenu]->mapToGlobal(menuBottom)));
if( !f->exists( this )) // 'this' was destroyed
return;
button[BtnMenu]->setDown(false);