kwin/effects/sheet
Vlad Zagorodniy 59e3e21c47 [effects/sheet] Drop IsSheetWindow hack
Summary:
When the Sheet effect was written, isModal worked only for Client
windows, not Deleted windows:

    bool EffectWindowImpl::isModal() const
        {
        if( Client* c = dynamic_cast< Client* >( toplevel ))
            return c->isModal();
        return false;
        }

so the Sheet effect had to track windows by using WindowInfo class, e.g.

    class WindowInfo
        {
        public:
            bool deleted;
            bool added;
            bool closed;
        };

the biggest drawback of that method is that WindowInfo for each modal kept around
as long as those modals existed. It also was adding little overhead, e.g.

    void SheetEffect::paintWindow( EffectWindow* w, int mask, QRegion region, WindowPaintData& data )
        {
        if( windows.contains( w ) && ( windows[ w ].added || windows[ w ].closed ) )

Things changed with a8160b3c31afa1db24084147ad4ce50cf3c0314a. With that
commit, WindowInfo kept only for modals that are currently being
animated, but isModal still worked only with Client windows, so
IsSheetWindow hack had been introduced.

Long story short: we don't need IsSheetWindow hack anymore because
isModal now works with Deleted windows.

Test Plan: Pressed Ctrl+O in Kate.

Reviewers: #kwin, graesslin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14246
2018-07-21 10:44:18 +03:00
..
CMakeLists.txt [effects] Drop the .desktop files for the BuiltIn Effects 2014-04-28 13:52:43 +02:00
sheet.cpp [effects/sheet] Drop IsSheetWindow hack 2018-07-21 10:44:18 +03:00
sheet.h [kwin] Add a virtual Effect::requestedEffectChainPosition 2014-03-28 14:04:54 +01:00
sheet.kcfg [effects] Use arg="true" in the kcfg files 2017-04-15 10:03:34 +02:00
sheetconfig.kcfgc Port Sheet effect to KConfigXT 2013-03-22 10:34:56 +01:00