plugins/overview: also do things when changing to active

We were binding to the statusChanged signal, but then only doing
anything if the status had changed to "Activating". This did not work
for when the effect was activated without a gesture, because then its
status would change straight to "Activated", bypassing the in-between
state of "Activating."

This fixes clearing the search text on activation without a gesture.
This commit is contained in:
Nate Graham 2023-06-15 17:30:32 -06:00 committed by Vlad Zahorodnii
parent 712fd3396c
commit ad4ce627ae

View file

@ -32,7 +32,7 @@ OverviewEffect::OverviewEffect()
connect(m_state, &EffectTogglableState::inProgressChanged, this, &OverviewEffect::gestureInProgressChanged);
connect(m_state, &EffectTogglableState::partialActivationFactorChanged, this, &OverviewEffect::partialActivationFactorChanged);
connect(m_state, &EffectTogglableState::statusChanged, this, [this](EffectTogglableState::Status status) {
if (status == EffectTogglableState::Status::Activating) {
if (status == EffectTogglableState::Status::Activating || status == EffectTogglableState::Status::Active) {
m_searchText = QString();
}
setRunning(status != EffectTogglableState::Status::Inactive);