[Notifications] Also consider enabled and connected for screen to be checked against

Fixes erroneously enabling do not disturb mode in some situations when having screens mirrored and then closing the lid.
You'll have two overlapping screens but one of them is disabled so should be ignored.
Depending on the order of outputs this may or may not happen (which is why I didn't notice earlier when I tested with my new laptop).

CHANGELOG: Fixed erroneously entering do not disturb mode when there are overlapping *disabled* screens

Differential Revision: https://phabricator.kde.org/D24679
wilder-5.17
Kai Uwe Broulik 6 years ago
parent 902daff3b4
commit 013e7ae0df
  1. 2
      libnotificationmanager/mirroredscreenstracker.cpp

@ -84,7 +84,7 @@ void MirroredScreensTracker::checkScreensMirrored()
}
for (const KScreen::OutputPtr &checkOutput : outputs) {
if (checkOutput == output) {
if (checkOutput == output || !checkOutput->isConnected() || !checkOutput->isEnabled()) {
continue;
}

Loading…
Cancel
Save