davidedmundson created this revision. davidedmundson added a reviewer: Plasma. Restricted Application added projects: Plasma on Wayland, Frameworks. Restricted Application added subscribers: Frameworks, plasma-devel.
REVISION SUMMARY This allows a server to filter which globals are visible and bindable by clients. Design rationale: Could be it's own class with Display as an arg, but we need the lifespan to exactly match Display, and the cardinality to match Display and it needs to be set after we're started but before clients connect. Better to enfore rules with code than with documentation. I'm filtering by interface name as there isn't any other good identifier of what a wl_global refers to, even if you could assume you can cast the userdata to a Server::Global. --- Note also that I posted my proposal on https://phabricator.kde.org/T4437 of how the kwin side should behave. We probably need to restart a discussion / fight to the death on plasma- devel about that before proceeding. TEST PLAN Attached unit test REPOSITORY R127 KWayland BRANCH filter2 REVISION DETAIL https://phabricator.kde.org/D8050 AFFECTED FILES autotests/client/CMakeLists.txt autotests/client/test_wayland_filter.cpp src/server/CMakeLists.txt src/server/filtered_display.cpp src/server/filtered_display.h To: davidedmundson, #plasma Cc: plasma-devel, #frameworks, leezu, ZrenBot, alexeymin, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, eliasp, sebas, apol, mart, hein