![]() Registered Member ![]()
|
hi,everyone:
my OS: kubuntu 20.04 my Qt: 5.12 I very like video wallpaer(QML language), so i install it. everything is ok,but when lockscreen is actived, video cannot auto pause.(my media contain audio,because audio still playing) so i want to modify some code of videowallpaper. i encount a problem that how to receive signal from lockscreen event? i research several days and no solution found. now i want to monitor process named "kscreenlocker_greet". but I don't know whick QML component can be use to monitor process ? I try use "import QtApplicationManager 1.0" but qtcreator says : module "QtApplicationManager" is not installed,I don't know which package should i install whit "sudo apt-get". If there is no way to solve this problem,Is there any component provide by KDE-framework ? |
![]() Registered Member ![]()
|
You can use the dbus-methods provided by either ksmserver or freedesktop.org:
which also provides a signal called «ActiveChanged» you can listen on with DBus-monitor. QML does not provide a dbus-method afair, but you can use a c++ approach or a system call via exec. Another way would be to use systemd-inhibit to disable the screensaver while your media-stuff is running. |
Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]