diff --git a/src/wayland_server.cpp b/src/wayland_server.cpp index 6d9b40dc79..e3ed4601eb 100644 --- a/src/wayland_server.cpp +++ b/src/wayland_server.cpp @@ -487,12 +487,6 @@ bool WaylandServer::init(InitializationFlags flags) if (XdgToplevelClient *client = findXdgToplevelClient(decoration->surface())) { client->installServerDecoration(decoration); } - connect(decoration, &ServerSideDecorationInterface::modeRequested, this, - [decoration] (ServerSideDecorationManagerInterface::Mode mode) { - // always acknowledge the requested mode - decoration->setMode(mode); - } - ); } ); diff --git a/src/xdgshellclient.cpp b/src/xdgshellclient.cpp index 0dbc843a8a..31c980ad74 100644 --- a/src/xdgshellclient.cpp +++ b/src/xdgshellclient.cpp @@ -725,7 +725,7 @@ bool XdgToplevelClient::userCanSetFullScreen() const bool XdgToplevelClient::userCanSetNoBorder() const { if (m_serverDecoration) { - switch (m_serverDecoration->mode()) { + switch (m_serverDecoration->preferredMode()) { case ServerSideDecorationManagerInterface::Mode::Server: return !isFullScreen() && !isShade(); case ServerSideDecorationManagerInterface::Mode::Client: @@ -748,7 +748,7 @@ bool XdgToplevelClient::userCanSetNoBorder() const bool XdgToplevelClient::noBorder() const { if (m_serverDecoration) { - switch (m_serverDecoration->mode()) { + switch (m_serverDecoration->preferredMode()) { case ServerSideDecorationManagerInterface::Mode::Server: return m_userNoBorder || isRequestedFullScreen(); case ServerSideDecorationManagerInterface::Mode::Client: @@ -1465,9 +1465,9 @@ void XdgToplevelClient::installServerDecoration(ServerSideDecorationInterface *d updateDecoration(/* check_workspace_pos */ true); } }); - connect(m_serverDecoration, &ServerSideDecorationInterface::modeRequested, this, - [this] (ServerSideDecorationManagerInterface::Mode mode) { - const bool changed = mode != m_serverDecoration->mode(); + connect(m_serverDecoration, &ServerSideDecorationInterface::preferredModeChanged, this, + [this] () { + const bool changed = m_serverDecoration->preferredMode() != m_serverDecoration->mode(); if (changed && readyForPainting()) { updateDecoration(/* check_workspace_pos */ true); }