lxqt / lxqt-session

The LXQt session manager
https://lxqt.github.io
GNU Lesser General Public License v2.1
55 stars 52 forks source link

Reenable locksettings under wayland #514

Closed stefonarch closed 1 month ago

stefonarch commented 2 months ago

Reverts partially https://github.com/lxqt/lxqt-session/commit/0048ae69b38fb9db6b339787336d16c944869551

No crash of lxqt-session is happening now as isScreenSaverLocked isn't called anymore. https://github.com/lxqt/liblxqt/commit/255f3474f6ad765dd0a6bdc305f13116ba6cb4db

Just the error message aboutxdg-screensaver lock is displayed if checked.

Needed by https://github.com/lxqt/liblxqt/pull/346

stefonarch commented 1 month ago

This needs an exception for kwin_wayland as none of the lockers will work. Something like if (lockScreenManager->startup(iskwin? settings.value(QLatin1String("lock_screen_before_power_actions"), true).toBool() : false

stefonarch commented 1 month ago

Added a check for kwin_wayland.
Suspending settings are handled by kwin, by default it will suspend on lid close for example while LXQt can't know about this and without this check it if "lock session on suspend/hibernate" is checked the usual error message will be shown at resume: "Could not execute "swaylock"... "

Another check can be made at startup and disable screenlocking completely if this option is unchecked. As there is no cli command to lock screen afaik this is the only way to handle it I think.