Bug 426198

Summary: kwin wayland build has X11 dependency
Product: [Plasma] kwin Reporter: Leonard Lausen <leonard>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED LATER    
Severity: normal CC: kde, leonard
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: attachment-6806-0.html

Description Leonard Lausen 2020-09-05 04:23:34 UTC
SUMMARY
kwin CMakeLists.txt seems to always require X11. However, users may wish to build kwin only for wayland without X11 support.

OBSERVED RESULT
Building KWin for Wayland requires building KWin for X11 too.

EXPECTED RESULT
KWin can be build for Wayland without building for X11. An option USE_X11 can be used to toggle if X11 target is built.
Comment 1 David Edmundson 2020-09-05 15:14:01 UTC
Compiling against X and using it on wayland only are very different topics.

You can already use kwin only for wayland. Simply don't pass the --xwayland parameter.

The headers and linked libraries are relatively tiny and our dependencies also require X anyway. We ultimately plan to slowly phase some of that out but not in the very near future.
Comment 2 Leonard Lausen 2020-09-05 16:08:09 UTC
Created attachment 131435 [details]
attachment-6806-0.html

Thank you for elaborating David. Where are the dependencies that also require X anyways tracked? If they aren't tracked, would it be sensible to track them in this bug report?

Given the existing runtime support for disabling xwayland, this seems to be mainly an issue with the build system and the dependencies. 

On September 5, 2020 8:14:01 AM PDT, David Edmundson <bugzilla_noreply@kde.org> wrote:
>
>https://bugs.kde.org/show_bug.cgi?id=426198
>
>David Edmundson <kde@davidedmundson.co.uk> changed:
>
>           What    |Removed                     |Added
>----------------------------------------------------------------------------
>         Resolution|---                         |LATER
>                 CC|                            |kde@davidedmundson.co.uk
>             Status|REPORTED                    |RESOLVED
>
>--- Comment #1 from David Edmundson <kde@davidedmundson.co.uk> ---
>Compiling against X and using it on wayland only are very different topics.
>
>You can already use kwin only for wayland. Simply don't pass the --xwayland
>parameter.
>
>The headers and linked libraries are relatively tiny and our dependencies also
>require X anyway. We ultimately plan to slowly phase some of that out but not
>in the very near future.
>
>-- 
>You are receiving this mail because:
>You reported the bug.
>You are on the CC list for the bug.
Comment 3 David Edmundson 2020-09-05 17:08:42 UTC
Out of curiosity what's your usecase?

An embedded system with custom apps or a full desktop?
Comment 4 Leonard Lausen 2020-09-05 17:55:13 UTC
I'm building a full KDE Plasma desktop environment from source on
Gentoo. Thanks to the great work of KDE community and others, Plasma
wayland is fully usable on my setup since a couple of months and I am
curious what it takes to remove all X11 packages. In general, Gentoo
makes it easy to enable/disable certain build-time features such as X11
via USEFLAGs. Thus removal off X11 packages is possible in principle.

If you are aware of any dependencies that block this, collecting the
list here will make it easier to work towards the goal.