fix: lock action calls moonlock directly instead of loginctl
loginctl lock-session requires a D-Bus listener that is difficult to set up reliably. Direct moonlock invocation is simpler and works immediately. Also removes CSS fade-in animation (low-fps on layer shell).
This commit is contained in:
+2
-2
@@ -13,11 +13,11 @@ class TestLock:
|
||||
"""Tests for the lock power action."""
|
||||
|
||||
@patch("moonset.power.subprocess.run")
|
||||
def test_calls_loginctl_lock_session(self, mock_run) -> None:
|
||||
def test_calls_moonlock(self, mock_run) -> None:
|
||||
lock()
|
||||
|
||||
mock_run.assert_called_once_with(
|
||||
["loginctl", "lock-session"], check=True, timeout=POWER_TIMEOUT
|
||||
["moonlock"], check=True, timeout=POWER_TIMEOUT
|
||||
)
|
||||
|
||||
@patch("moonset.power.subprocess.run")
|
||||
|
||||
Reference in New Issue
Block a user