wayland: Let user set "no border" property in more cases
It can also be applied to client-side decorations. As long as the compositor can ask the client to use some specific decoration mode, the "no border" property can be set.
This commit is contained in:
parent
f1974db5c9
commit
fde0e243d9
2 changed files with 1 additions and 21 deletions
|
@ -995,7 +995,6 @@ void TestXdgShellClient::testXdgDecoration()
|
|||
|
||||
shellSurface->xdgSurface()->ack_configure(surfaceConfigureRequestedSpy.last()[0].toInt());
|
||||
auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
|
||||
QCOMPARE(c->userCanSetNoBorder(), expectedMode == Test::XdgToplevelDecorationV1::mode_server_side);
|
||||
QCOMPARE(c->isDecorated(), expectedMode == Test::XdgToplevelDecorationV1::mode_server_side);
|
||||
}
|
||||
|
||||
|
|
|
@ -723,26 +723,7 @@ bool XdgToplevelClient::userCanSetFullScreen() const
|
|||
|
||||
bool XdgToplevelClient::userCanSetNoBorder() const
|
||||
{
|
||||
if (m_serverDecoration) {
|
||||
switch (m_serverDecoration->preferredMode()) {
|
||||
case ServerSideDecorationManagerInterface::Mode::Server:
|
||||
return !isFullScreen() && !isShade();
|
||||
case ServerSideDecorationManagerInterface::Mode::Client:
|
||||
case ServerSideDecorationManagerInterface::Mode::None:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (m_xdgDecoration) {
|
||||
switch (m_xdgDecoration->preferredMode()) {
|
||||
case XdgToplevelDecorationV1Interface::Mode::Server:
|
||||
case XdgToplevelDecorationV1Interface::Mode::Undefined:
|
||||
return Decoration::DecorationBridge::hasPlugin() && !isFullScreen() && !isShade();
|
||||
case XdgToplevelDecorationV1Interface::Mode::None:
|
||||
case XdgToplevelDecorationV1Interface::Mode::Client:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return (m_serverDecoration || m_xdgDecoration) && !isFullScreen() && !isShade();
|
||||
}
|
||||
|
||||
bool XdgToplevelClient::noBorder() const
|
||||
|
|
Loading…
Reference in a new issue