Save the correct value of noborder property

Summary:
We can't use Client::noBorder while saving the desktop session because
the returned value is not necessarily set by the user.

BUG: 403948

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18756
This commit is contained in:
Vlad Zagorodniy 2019-02-05 13:10:40 +02:00
parent 5d63b9c05b
commit 64115d4de2
3 changed files with 8 additions and 2 deletions

View file

@ -562,9 +562,14 @@ void Client::resizeDecoration()
updateInputWindow();
}
bool Client::userNoBorder() const
{
return noborder;
}
bool Client::noBorder() const
{
return noborder || isFullScreen();
return userNoBorder() || isFullScreen();
}
bool Client::userCanSetNoBorder() const

View file

@ -157,6 +157,7 @@ public:
return fullscreen_mode; // only for session saving
}
bool userNoBorder() const;
bool noBorder() const override;
void setNoBorder(bool set) override;
bool userCanSetNoBorder() const override;

2
sm.cpp
View file

@ -167,7 +167,7 @@ void Workspace::storeClient(KConfigGroup &cg, int num, Client *c)
cg.writeEntry(QLatin1String("skipPager") + n, c->skipPager());
cg.writeEntry(QLatin1String("skipSwitcher") + n, c->skipSwitcher());
// not really just set by user, but name kept for back. comp. reasons
cg.writeEntry(QLatin1String("userNoBorder") + n, c->noBorder());
cg.writeEntry(QLatin1String("userNoBorder") + n, c->userNoBorder());
cg.writeEntry(QLatin1String("windowType") + n, windowTypeToTxt(c->windowType()));
cg.writeEntry(QLatin1String("shortcut") + n, c->shortcut().toString());
cg.writeEntry(QLatin1String("stackingOrder") + n, unconstrained_stacking_order.indexOf(c));