[effects/diminactive] Fix false-triggering of the out animation
ClosedPublic

Authored by zzag on Oct 17 2018, 12:00 PM.

Details

Summary

In some cases, the out transition is false-triggered because we don't
react to changes in the keep-above and the full screen state.

Test Plan
  • Set the keep-above state on a window;
  • Click on the desktop;
  • (the window didn't "flicker")

Diff Detail

Repository
R108 KWin
Branch
effects-diminactive-false-trigger
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 3980
Build 3998: arc lint + arc unit
zzag created this revision.Oct 17 2018, 12:00 PM
Restricted Application added a project: KWin. · View Herald TranscriptOct 17 2018, 12:00 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Oct 17 2018, 12:00 PM
davidedmundson accepted this revision.Oct 18 2018, 2:28 PM
davidedmundson added a subscriber: davidedmundson.
davidedmundson added inline comments.
effects/diminactive/diminactive.cpp
86–91

could this become updateActiveWindow(effects->activeWindow());

This revision is now accepted and ready to land.Oct 18 2018, 2:28 PM
zzag added inline comments.Oct 18 2018, 3:00 PM
effects/diminactive/diminactive.cpp
86–91

I was thinking about something similar. We could split canDimWindow:

bool canDimWindow(const EffectWindow *w)
{
    if (m_activeWindow == w) {
        return false;
    }

    // check window group

    return isDimWindow(w);
}

bool isDimWindow(const EffectWindow *w)
{
    if (!m_dimKeepAbove && w->w->keepAbove()) {
        return fasel;
    }

    // other checks

    return w->isNormalWindow() || ...;
}

And use isDimWindow here, in reconfigure, and in updateActiveWindow. By doing that, we won't need all those ugly m_activeWindow = nullptr;

zzag added inline comments.Oct 18 2018, 3:09 PM
effects/diminactive/diminactive.cpp
86–91

But, yeah, it could. I'll update this on push.

This revision was automatically updated to reflect the committed changes.