From 7a3c2926122603752916f8b6ecc00a3333528707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Mon, 19 Jun 2017 06:54:54 +0200 Subject: [PATCH] Fix switch desktop on screenedge while resizing a Wayland window Summary: Screenedges only allows to switch desktop while moving window, not while resizing. There was a special branch which only checked this for X11 windows but not for Wayland windows. This change removes a no longer needed cast from AbstractClient to Client so that the check whether a window is getting resized works for both X11 and Wayland clients. The cast was introduced in a time when AbstractClient did not yet support the isResize method. Reviewers: #kwin, #plasma Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D6264 --- screenedge.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/screenedge.cpp b/screenedge.cpp index 7e4fc07212..0b17a0e413 100644 --- a/screenedge.cpp +++ b/screenedge.cpp @@ -299,10 +299,7 @@ bool Edge::canActivate(const QPoint &cursorPos, const QDateTime &triggerTime) void Edge::handle(const QPoint &cursorPos) { AbstractClient *movingClient = Workspace::self()->getMovingClient(); - bool isResize = false; - if (Client *movingClientClient = qobject_cast(movingClient)) - isResize = movingClientClient->isResize(); - if ((edges()->isDesktopSwitchingMovingClients() && movingClient && !isResize) || + if ((edges()->isDesktopSwitchingMovingClients() && movingClient && !movingClient->isResize()) || (edges()->isDesktopSwitching() && isScreenEdge())) { // always switch desktops in case: // moving a Client and option for switch on client move is enabled