[client] Drop the checks for platformName being "wayland"
ClosedPublic

Authored by graesslin on Oct 11 2017, 3:38 PM.

Details

Summary

There are also QPA's which are "wayland" but have a different name. An
example is flatpak. Any code using KWayland::Client is basically
disabled on this platform due to the incorrect checks for the platform
name.

If we run on a platform which provides wl_display through the native
interface we should be able to assume that it truly is Wayland and that
it speaks wayland. Similar for all the other checks. The only
problematic code might be the check in Surface, but on the other hand we
can assume that code using Surface::fromWindow has also created a
ConnectionThread and thus knows whether it's Wayland or not.

This fixes the Plasma integration for flatpak.

Test Plan

Flatpak windows have decorations in Plasma now.

Diff Detail

Repository
R127 KWayland
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin created this revision.Oct 11 2017, 3:38 PM
Restricted Application added projects: Plasma on Wayland, Frameworks. · View Herald TranscriptOct 11 2017, 3:38 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson accepted this revision.Oct 20 2017, 7:25 AM
davidedmundson added a subscriber: davidedmundson.

Meh.
We're potentially gonna get some mental crashes.

Can't find a better option though :/

This revision is now accepted and ready to land.Oct 20 2017, 7:25 AM

Meh.
We're potentially gonna get some mental crashes.

Yes, but it should also be obvious. If it crashes with one of these methods in the backtrace we can be sure someone didn't check properly.

This revision was automatically updated to reflect the committed changes.