Switch ThumbnailItem to internal uuid instead of WId
ClosedPublic

Authored by graesslin on Jan 20 2019, 1:11 PM.

Details

Summary

So far the ThumbnailItem in TabBox mode used the window id for finding
the window it should render a thumbnail on. In the Wayland world this is
not unique. The window id could be either an X11 window or a wayland
window. We don't guarantee that there are no conflicting ids.

With the internal id we have a way to properly identify the windows, so
this element should use them.

To support this the property changed the type to QUuid and the
clientmodel also provides the QUuid. As in TabBox the way to get the
window is through the model this should be compatible for all themes.
It's tested and verified with the Breeze switcher.

For declarative KWin scripts the ThumbnailItem also provides the
AbstractClient as a property, so there should not be any script which
uses wid. If it does, this could break, but well the script should use
the intended API.

Test Plan

ctest passes, manual testing of Breeze alt-tab switcher

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 requested review of this revision.Jan 20 2019, 1:11 PM
graesslin created this revision.
graesslin set the repository for this revision to R108 KWin.Jan 20 2019, 1:18 PM
Restricted Application added a project: KWin. · View Herald TranscriptJan 20 2019, 1:18 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag accepted this revision.Jan 20 2019, 5:53 PM
zzag added a subscriber: zzag.

Other switchers seem to work fine as well.

This revision is now accepted and ready to land.Jan 20 2019, 5:53 PM
This revision was automatically updated to reflect the committed changes.