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
icc-effect-5.14.5
Martin Flöser 2017-06-19 06:54:54 +02:00
parent c45e165514
commit 7a3c292612
1 changed files with 1 additions and 4 deletions

View File

@ -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