Commit aab395f0 authored by David Edmundson's avatar David Edmundson Committed by Vlad Zahorodnii
Browse files

Check lockscreen status for fullscreen effects

Whilst global shortcuts are blocked by grabbing the keyboard, user set
up manual scripts can still invoke a global action.

Given we already have code to deactivate when locking it makes sense to
also prevent activation.

BUG: 450331
parent 1b4f3960
Pipeline #139022 passed with stage
in 26 minutes
......@@ -68,6 +68,9 @@ DesktopGridEffect::DesktopGridEffect()
connect(a, &QAction::triggered, this, [this]() {
if ((qreal(timeline.currentTime()) / qreal(timeline.duration())) > 0.5) {
if (effects->isScreenLocked()) {
return;
}
activated = true;
timeline.setDirection(QTimeLine::Forward);
timelineRunning = true;
......
......@@ -155,6 +155,9 @@ void OverviewEffect::toggle()
void OverviewEffect::activate()
{
if (effects->isScreenLocked()) {
return;
}
setRunning(true);
}
......
......@@ -1592,6 +1592,9 @@ void PresentWindowsEffect::setActive(bool active)
return;
if (m_activated == active)
return;
if (effects->isScreenLocked() && active) {
return;
}
m_activated = active;
if (m_activated) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment