From 3c6371390d698c8dd7a8c0704debba43d5d3b465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 4 Nov 2016 09:28:06 +0100 Subject: [PATCH] [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 --- effects/desktopgrid/desktopgrid.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/effects/desktopgrid/desktopgrid.cpp b/effects/desktopgrid/desktopgrid.cpp index 498e543de3..6e3c372033 100644 --- a/effects/desktopgrid/desktopgrid.cpp +++ b/effects/desktopgrid/desktopgrid.cpp @@ -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()) {