Make desktop grid effect check for active effects before responding to gestures
This commit is contained in:
parent
5cf8db26ec
commit
7a6792aa2f
1 changed files with 9 additions and 2 deletions
|
@ -67,6 +67,9 @@ DesktopGridEffect::DesktopGridEffect()
|
||||||
QAction* a = m_gestureAction;
|
QAction* a = m_gestureAction;
|
||||||
|
|
||||||
connect(a, &QAction::triggered, this, [this]() {
|
connect(a, &QAction::triggered, this, [this]() {
|
||||||
|
if (effects->hasActiveFullScreenEffect() && effects->activeFullScreenEffect() != this) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ((qreal(timeline.currentTime()) / qreal(timeline.duration())) > 0.5) {
|
if ((qreal(timeline.currentTime()) / qreal(timeline.duration())) > 0.5) {
|
||||||
if (effects->isScreenLocked()) {
|
if (effects->isScreenLocked()) {
|
||||||
return;
|
return;
|
||||||
|
@ -83,7 +86,12 @@ DesktopGridEffect::DesktopGridEffect()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
effects->registerRealtimeTouchpadPinchShortcut(PinchDirection::Contracting, 4, a, [this](qreal cb) {
|
effects->registerRealtimeTouchpadPinchShortcut(PinchDirection::Contracting, 4, a, [this](qreal cb) {
|
||||||
if (activated) return;
|
if (activated) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (effects->hasActiveFullScreenEffect() && effects->activeFullScreenEffect() != this) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (timeline.currentValue() == 0) {
|
if (timeline.currentValue() == 0) {
|
||||||
activated = true;
|
activated = true;
|
||||||
|
@ -102,7 +110,6 @@ DesktopGridEffect::DesktopGridEffect()
|
||||||
setup();
|
setup();
|
||||||
activated = false;
|
activated = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
timeline.setCurrentTime(timeline.duration() * cb);
|
timeline.setCurrentTime(timeline.duration() * cb);
|
||||||
effects->addRepaintFull();
|
effects->addRepaintFull();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue