Add a surface tree to DebugConsole
ClosedPublic

Authored by graesslin on Mar 23 2016, 10:34 AM.

Details

Summary

While developing support for sub-surfaces it became obvious that there
is a need for visualizing the tree of sub-surfaces.

The surface-tree is a new mode added in the debug console. There are now
two buttons to switch between the default window tree and the surface
tree.

The surface tree is a little bit more basic than the windows tree. The
type of window (whether x11, wayland or internal) is ignored. All windows
build up the top level with the sub surfaces as children.

Each surface is represented by some basic information about it:

  • Client (binary path and pid)
  • internal surface id

If the surface has a shared memory buffer mapped a scaled down version
is used as the window decoration role.

The model gets reset whenever the tree changes in some way as it's
rather complex to track correctly and well, it's just a debug console.

Currently the tree is not really functional yet as KWin doesn't announce
support for sub-compositor protocol, which is also the reason for lack of
autotests for the model. Will be added once sub-compositor works
properly.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 2917.Mar 23 2016, 10:34 AM
graesslin retitled this revision from to Add a surface tree to DebugConsole.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptMar 23 2016, 10:34 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript

New tree in action showing the sub-surface tree of Systemsettings in Desktop Effects KCM.

mart accepted this revision.Mar 23 2016, 11:12 AM
mart added a reviewer: mart.
This revision is now accepted and ready to land.Mar 23 2016, 11:12 AM
This revision was automatically updated to reflect the committed changes.