Add addToplevel and removeToplevel to Scene
ClosedPublic

Authored by zzag on Jan 12 2019, 2:48 PM.

Details

Summary

Code that destroys all scene windows when finishing compositing is not
readable. E.g. can you tell what this piece of code is doing without
looking into the source code of Scene::windowClosed?

foreach (Client * c, Workspace::self()->clientList())
    m_scene->windowClosed(c, NULL);

This change intoduces removeToplevel(as well its counterpart) method to
the Scene class. The name of the new method much better describes what
we're doing.

Diff Detail

Repository
R108 KWin
Branch
tidy-scene
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 7735
Build 7753: arc lint + arc unit
zzag created this revision.Jan 12 2019, 2:48 PM
Restricted Application added a project: KWin. · View Herald TranscriptJan 12 2019, 2:48 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Jan 12 2019, 2:48 PM
zzag updated this revision to Diff 50623.Jan 31 2019, 9:38 PM
zzag retitled this revision from Add addWindow and removeWindow to Scene to Add addToplevel and removeToplevel to Scene.
zzag edited the summary of this revision. (Show Details)

Rename addWindow and removeWindow to addToplevel and removeToplevel
respectively. The main reason is to avoid confusion between Toplevels
and Scene::Windows.

zzag added a comment.Feb 14 2019, 11:52 AM

If there are no objections, I'm going to push this.

davidedmundson accepted this revision.Feb 14 2019, 12:07 PM
This revision is now accepted and ready to land.Feb 14 2019, 12:07 PM
This revision was automatically updated to reflect the committed changes.