Make XDGShellV5 co-compilable with XDGWMBase
ClosedPublic

Authored by davidedmundson on Jun 11 2018, 10:42 PM.

Details

Summary

When we add WMBase (the new name stable XdgShell) we get a clash with
XDGShellV5. This clash consists of all functions in the generated C file
which clashes at linker time, as well as multiple xdg_blah_interface
structs which would get redefined.

XDGShellV5 in practice is used by literally no-one (Qt never defaulted
to it if wl-shell was available) and has been dropped from GTK when
they added v6. But it's used by some kwin unit tests so breaking
would cause issues for stable kwin release tests... so it's a pain.

We can't mod the XML as we need the strings sent down the wire to remain
the same and we need the same names for our forward declared structs
that the client code can cast to.

This patch copies the generated files and modifies them manually.
Hacky, but we know this code will never change again - and IMHO this
task isn't one worth investing too much time into.

Test Plan

Finished my XDG WM Base patch (see next phab) and things compile \o/

Unit test still passes

Ran: QT_WAYLAND_SHELL_INTEGRATION=xdg-shell-v5 dolphin --platform wayland and verified it worked

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.
Restricted Application added a project: Frameworks. · View Herald TranscriptJun 11 2018, 10:42 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Jun 11 2018, 10:42 PM
romangg added inline comments.
src/client/xdgshell_v5.cpp
36

This should be still an override.

src/compat/wayland-xdg-shell-v5-client-protocol.h
2

Is this file not also changed like the other ones?

romangg accepted this revision.Jul 2 2018, 8:52 AM
This revision is now accepted and ready to land.Jul 2 2018, 8:52 AM
This revision was automatically updated to reflect the committed changes.

In libkf5waylandclient5 and libkf5waylandserver5 I see the previously emitted symbol xdg_shell_interface@Base is now reported as MISSING.

Can you confirm this is private and/or not an ABI break?

Build symbols output: https://paste.kde.org/pfpkps1mb#line-109

It was an exported symbol, but the relevant header was never exposed