Use a real Qt::Popup menu => TODO: fix workaround

This commit is contained in:
Cedric Bellegarde 2012-11-23 12:44:53 +01:00
parent feb352c84c
commit 89d35aa958

View file

@ -27,6 +27,7 @@ DEALINGS IN THE SOFTWARE.
#include <kdebug.h> #include <kdebug.h>
#include <QApplication> #include <QApplication>
#include <QMenu>
#include <kglobal.h> #include <kglobal.h>
#include <assert.h> #include <assert.h>
#if defined Q_WS_X11 && ! defined K_WS_QTONLY #if defined Q_WS_X11 && ! defined K_WS_QTONLY
@ -225,6 +226,13 @@ void KDecoration::showWindowMenu(QPoint pos)
void KDecoration::showApplicationMenu(const QPoint &p) void KDecoration::showApplicationMenu(const QPoint &p)
{ {
//FIXME: Remove this workaround
// Without showing/hiding this fake widget,
// menu showed by kded-appmenu will fail to grab input
//TODO: Find a proper solution
QMenu fake;
fake.show();
fake.hide();
bridge_->showApplicationMenu(p); bridge_->showApplicationMenu(p);
} }