Bug 472994 - How to use layer-shell-qt in an application
Summary: How to use layer-shell-qt in an application
Status: RESOLVED NOT A BUG
Alias: None
Product: layer-shell-qt
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-04 09:35 UTC by Elias Steurer
Modified: 2023-08-04 15:05 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!