diff options
authorMartin Flöser <[email protected]>2017-06-19 06:54:54 +0200
committerMartin Flöser <[email protected]>2017-06-20 06:58:03 +0200
commit7a3c2926122603752916f8b6ecc00a3333528707 (patch)
parentc45e165514ec70314d721d6e0238431ab92bd441 (diff)
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
1 files changed, 1 insertions, 4 deletions
diff --git a/screenedge.cpp b/screenedge.cpp
index 7e4fc07..0b17a0e 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<Client*>(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