Bug 472994

Summary: How to use layer-shell-qt in an application
Product: [Frameworks and Libraries] layer-shell-qt Reporter: Elias Steurer <i>
Component: generalAssignee: Aleix Pol <aleixpol>
Status: RESOLVED NOT A BUG    
Severity: normal CC: nicolas.fella
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Elias Steurer 2023-08-04 09:35:15 UTC
SUMMARY
My goal is to add Wayland support to ScreenPlay. ScreenPlay is an Open Source Live-Wallpaper app for Windows and OSX written in Qt 6.5 and qml. 

STEPS TO REPRODUCE
1.  Clone ScreenPlay and check out this MR https://gitlab.com/kelteseth/ScreenPlay/-/merge_requests/106#b7045c08a6069f1f5456dfd608d3c8385402338c
2. cd Tools
3.  python -m  pip install -r requirements.txt
4.  python3 setup.py
5. CMake configure via VSCode or QtCreator CMakePresets.json

OBSERVED RESULT
CMake is unable to configure because of ECM dependencies

EXPECTED RESULT
To be able to configure and run wallpaper

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Kubuntu 22.04 
(available in About System)
KDE Plasma Version: KDE 5.24.7
KDE Frameworks Version:  5.92.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Comment 1 Nicolas Fella 2023-08-04 11:56:57 UTC
ECM refers to https://invent.kde.org/frameworks/extra-cmake-modules/. You need to add that to your build environment
Comment 2 Elias Steurer 2023-08-04 12:48:18 UTC
I'm trying to do exactly that. For this, I added ECM and the layer-shell-qt via CMake FetchContent. CMake/layer-shell-qt then either complains about not finding ecm or finding not a suitable version, see https://gitlab.com/kelteseth/ScreenPlay/-/merge_requests/106/diffs#236c5f57741468d5819178c066ff5fe6e5a31092_21_22 any idea what I can try to do different?
Comment 3 Elias Steurer 2023-08-04 13:11:50 UTC
Update: I have managed to install ecm and layer-shell-qt via the regular configure, make and make install. Now on to integration with ScreenPlayWallpaper. I do have to link to LayerShellQtInterface right?
Comment 4 Elias Steurer 2023-08-04 14:57:14 UTC
I have now running on KDE. This should also work on Gnome, right? When testing with Gnome (Wayland) 42.9 it displays the window as regular window and not as background when setting it to LayerBackground
Comment 5 Elias Steurer 2023-08-04 15:05:25 UTC
Ok I have read about the thing with gnome not supporting layer-shell. At least it works on kde now. Thanks!