Commit 3c637139 authored by Martin Flöser's avatar Martin Flöser

[desktopgrid] Don't manipulate virtual desktop of desktop window

Summary:
Desktop Grid has a feature that right or middle clicking a window toggles
the on all desktop state. If that is done for a desktop window, things
obviously start to fail.

KWin internally allows to change virtual desktop for all windows, even
for windows like the desktop or docks. Changing in KWin core is not a
solution.

Thus a special casing in desktop grid is added to disallow the selection
for desktop windows.

BUG: 372037
FIXED-IN: 5.8.4

Test Plan: Tried right clicking desktop window and other windows.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3253
parent da0ba763
......@@ -560,6 +560,9 @@ void DesktopGridEffect::windowInputMouseEvent(QEvent* e)
}
} else if ((me->buttons() == Qt::MidButton || me->buttons() == Qt::RightButton) && windowMove == NULL) {
EffectWindow* w = windowAt(me->pos());
if (w && w->isDesktop()) {
w = nullptr;
}
if (w != NULL) {
int desktop = 0;
if (w->isOnAllDesktops()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment