Commit fde0e243 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

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.
parent f1974db5
Pipeline #131252 passed with stage
in 27 minutes and 4 seconds
......@@ -995,7 +995,6 @@ void TestXdgShellClient::testXdgDecoration()
auto c = Test::renderAndWaitForShown(, 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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment