don't allow to resize or move fullscreen windows

Summary:
add the same check of the Client class: if a window
is fullscreen, is not movable nor resizable

Test Plan:
Doesn't have any visible regression over normal usage,
this partially tackles a bug that can be seen in plasma mobile:
if the placement is "maximizing", then asking windows to be
shown as fullscreen has no effect and they will always be shown as a normal
maximized window.

this now doesn't happen anymore.. most of the times,
 as there must be some race condition
as a concause of the problem

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24515
This commit is contained in:
Marco Martin 2019-10-09 13:56:55 +02:00
parent 3ce9df9f96
commit 1a9a49ab7a

View file

@ -634,6 +634,9 @@ bool XdgShellClient::isMinimizable() const
bool XdgShellClient::isMovable() const bool XdgShellClient::isMovable() const
{ {
if (isFullScreen()) {
return false;
}
if (rules()->checkPosition(invalidPoint) != invalidPoint) { if (rules()->checkPosition(invalidPoint) != invalidPoint) {
return false; return false;
} }
@ -662,6 +665,9 @@ bool XdgShellClient::isMovableAcrossScreens() const
bool XdgShellClient::isResizable() const bool XdgShellClient::isResizable() const
{ {
if (isFullScreen()) {
return false;
}
if (rules()->checkSize(QSize()).isValid()) { if (rules()->checkSize(QSize()).isValid()) {
return false; return false;
} }