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
This commit is contained in:
parent
c45e165514
commit
7a3c292612
1 changed files with 1 additions and 4 deletions
|
@ -299,10 +299,7 @@ bool Edge::canActivate(const QPoint &cursorPos, const QDateTime &triggerTime)
|
||||||
void Edge::handle(const QPoint &cursorPos)
|
void Edge::handle(const QPoint &cursorPos)
|
||||||
{
|
{
|
||||||
AbstractClient *movingClient = Workspace::self()->getMovingClient();
|
AbstractClient *movingClient = Workspace::self()->getMovingClient();
|
||||||
bool isResize = false;
|
if ((edges()->isDesktopSwitchingMovingClients() && movingClient && !movingClient->isResize()) ||
|
||||||
if (Client *movingClientClient = qobject_cast<Client*>(movingClient))
|
|
||||||
isResize = movingClientClient->isResize();
|
|
||||||
if ((edges()->isDesktopSwitchingMovingClients() && movingClient && !isResize) ||
|
|
||||||
(edges()->isDesktopSwitching() && isScreenEdge())) {
|
(edges()->isDesktopSwitching() && isScreenEdge())) {
|
||||||
// always switch desktops in case:
|
// always switch desktops in case:
|
||||||
// moving a Client and option for switch on client move is enabled
|
// moving a Client and option for switch on client move is enabled
|
||||||
|
|
Loading…
Reference in a new issue