diff options
author | Ken Moore <moorekou@gmail.com> | 2015-12-02 09:36:04 -0500 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-12-02 09:36:04 -0500 |
commit | f5788dbc57dc21dd63c6beb7c8642115a4d7cb67 (patch) | |
tree | 7e84e0bbf71154ae5d6bff639a512046f4cdb95a /lumina-desktop/LDesktop.cpp | |
parent | Fix up the loading of locales through the StartMenu/Session. Now it will prop... (diff) | |
download | lumina-f5788dbc57dc21dd63c6beb7c8642115a4d7cb67.tar.gz lumina-f5788dbc57dc21dd63c6beb7c8642115a4d7cb67.tar.bz2 lumina-f5788dbc57dc21dd63c6beb7c8642115a4d7cb67.zip |
Fix up the context menu actions for the desktop a bit.
1) Now the desktop canvas itself will catch/maintain keyboard focus when clicked. This prevents issues with using a keyboard shortcut to simulate a right-click event causing strange behavior (what item (if any) has focus?).
2) Make sure that when the context menu is opened, it is always at the mouse cursor position (even if a key press opened the menu).
Diffstat (limited to 'lumina-desktop/LDesktop.cpp')
-rw-r--r-- | lumina-desktop/LDesktop.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lumina-desktop/LDesktop.cpp b/lumina-desktop/LDesktop.cpp index d3cde4c1..67ded6bd 100644 --- a/lumina-desktop/LDesktop.cpp +++ b/lumina-desktop/LDesktop.cpp @@ -218,10 +218,11 @@ void LDesktop::InitDesktop(){ bgWindow = new QWidget(); bgWindow->setObjectName("bgWindow"); bgWindow->setContextMenuPolicy(Qt::CustomContextMenu); + bgWindow->setFocusPolicy(Qt::StrongFocus); bgWindow->setWindowFlags(Qt::WindowStaysOnBottomHint | Qt::CustomizeWindowHint | Qt::FramelessWindowHint); LSession::handle()->XCB->SetAsDesktop(bgWindow->winId()); bgWindow->setGeometry(LSession::handle()->screenGeom(desktopnumber)); - connect(bgWindow, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowMenu(const QPoint&)) ); + connect(bgWindow, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowMenu()) ); if(DEBUG){ qDebug() << "Create bgDesktop"; } bgDesktop = new LDesktopPluginSpace(bgWindow); //new QMdiArea(bgWindow); int grid = settings->value(DPREFIX+"GridSize",-1).toInt(); |