Forward showing desktop only to rootInfo if it changed

Summary:
There was a property change for whenever a window gets activated although
that doesn't change the state.

In addition a nullptr check for rootInfo is added for the future no
XWayland case.

Test Plan:
run xev -root to verify the property does not get updated
needlessly

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D7097
icc-effect-5.14.5
Martin Flöser 2017-08-03 17:15:00 +02:00
parent 311fe315e0
commit 778b7d037f
1 changed files with 3 additions and 1 deletions

View File

@ -1299,7 +1299,9 @@ void Workspace::focusToNull()
void Workspace::setShowingDesktop(bool showing)
{
const bool changed = showing != showing_desktop;
rootInfo()->setShowingDesktop(showing);
if (rootInfo() && changed) {
rootInfo()->setShowingDesktop(showing);
}
showing_desktop = showing;
AbstractClient *topDesk = nullptr;