Commit 39153cf7 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


(cherry picked from commit aab395f0)
parent 9ab5bd8b
Pipeline #139026 passed with stage
in 23 minutes and 12 seconds
......@@ -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);
}
......
......@@ -1593,6 +1593,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