wayland: Honor NoPlugin option
If decorations are disabled, don't send xdg-toplevel-decoration configure events requesting ssd mode.
This commit is contained in:
parent
6c9e0781cd
commit
9977f21980
3 changed files with 14 additions and 2 deletions
|
@ -98,6 +98,15 @@ void DecorationBridge::readDecorationOptions()
|
|||
m_showToolTips = kwinApp()->config()->group(s_pluginName).readEntry("ShowToolTips", true);
|
||||
}
|
||||
|
||||
bool DecorationBridge::hasPlugin()
|
||||
{
|
||||
const DecorationBridge *bridge = DecorationBridge::self();
|
||||
if (!bridge) {
|
||||
return false;
|
||||
}
|
||||
return !bridge->m_noPlugin && bridge->m_factory;
|
||||
}
|
||||
|
||||
void DecorationBridge::init()
|
||||
{
|
||||
using namespace KWaylandServer;
|
||||
|
|
|
@ -39,6 +39,8 @@ class KWIN_EXPORT DecorationBridge : public KDecoration2::DecorationBridge
|
|||
public:
|
||||
~DecorationBridge() override;
|
||||
|
||||
static bool hasPlugin();
|
||||
|
||||
void init();
|
||||
KDecoration2::Decoration *createDecoration(AbstractClient *client);
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
*/
|
||||
#include "xdgshellclient.h"
|
||||
#include "abstract_wayland_output.h"
|
||||
#include "decorations/decorationbridge.h"
|
||||
#include "deleted.h"
|
||||
#include "platform.h"
|
||||
#include "screenedge.h"
|
||||
|
@ -564,7 +565,7 @@ bool XdgToplevelClient::userCanSetNoBorder() const
|
|||
switch (m_xdgDecoration->preferredMode()) {
|
||||
case XdgToplevelDecorationV1Interface::Mode::Server:
|
||||
case XdgToplevelDecorationV1Interface::Mode::Undefined:
|
||||
return !isFullScreen() && !isShade();
|
||||
return Decoration::DecorationBridge::hasPlugin() && !isFullScreen() && !isShade();
|
||||
case XdgToplevelDecorationV1Interface::Mode::Client:
|
||||
return false;
|
||||
}
|
||||
|
@ -587,7 +588,7 @@ bool XdgToplevelClient::noBorder() const
|
|||
switch (m_xdgDecoration->preferredMode()) {
|
||||
case XdgToplevelDecorationV1Interface::Mode::Server:
|
||||
case XdgToplevelDecorationV1Interface::Mode::Undefined:
|
||||
return m_userNoBorder || isFullScreen();
|
||||
return !Decoration::DecorationBridge::hasPlugin() || m_userNoBorder || isFullScreen();
|
||||
case XdgToplevelDecorationV1Interface::Mode::Client:
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue