diff --git a/packages/omamobile-omarchy/patches/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch b/packages/omamobile-omarchy/patches/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch new file mode 100644 index 000000000..74fcc2a07 --- /dev/null +++ b/packages/omamobile-omarchy/patches/0032-idle-re-arm-the-monitor-when-the-timeout-changes.patch @@ -0,0 +1,55 @@ +# Idle: re-arm the main idle monitor when its timeout changes. A lock or +# screensaver timeout changed while the shell runs never fired: the live +# IdleMonitor took the new timeout but never reported idle again until a +# shell restart (Pixel 8 Pro, Omarchy 4.0.6, quickshell 0.3.2.r7, Hyprland +# 0.57: untouched for 100 s after a change to 30 s, no lock). Switching the +# monitor off for 50 ms when firstIdleTimeoutSeconds changes starts it again; +# with this the phone locked 31 s after the change. +# handleIdleChanged() ignores the off/on flip, so the re-arm neither +# cancels a running idle cycle nor wakes a locked display. +# +# The bug is in Quickshell, not here (0.3.2.r7.g2b4501a, src/wayland/ +# idle_notify/monitor.cpp): on a timeout change updateNotification() deletes +# the old notification, creates the new one, and only then assigns the +# pointer isIdle is bound to. The new object lands at the old address, so +# the pointer "did not change" and isIdle stays bound to the destroyed one. +# Seen on the 8 Pro with Omarchy 4.5.0-3 and +# QT_LOGGING_RULES=quickshell.wayland.idle_notify.debug=true: Destroyed and +# Created at the same 0xffff5a365070, "has been marked idle", while +# `omarchy-shell idle status` kept "idle":false and nothing locked in 67 s. +# With this patch the new one came at another address and the phone locked +# 30 s after the change. Turning enabled off and on sends the pointer +# through null. Drop this once a Quickshell that clears the pointer before +# creating the new notification is on the phones: reported upstream as +# https://github.com/quickshell-mirror/quickshell/issues/938 and /1309, with +# an open fix in https://github.com/quickshell-mirror/quickshell/pull/1097 +# (bNotification = nullptr before the delete). + +--- i/shell/plugins/services/idle/Service.qml ++++ w/shell/plugins/services/idle/Service.qml +@@ -191,6 +191,8 @@ + function handleIdleChanged() { + logEvent("idle-monitor", idleMonitor.isIdle ? "idle" : "active") + if (!root.idleEnabled || !root.idleTimersEnabled) return ++ // The 50 ms re-arm below flips isIdle; it is not user activity. ++ if (root.idleRearming) return + + if (idleMonitor.isIdle) startIdleCycle() + else handleActiveSignal() +@@ -295,9 +297,15 @@ + } + } + ++ // A new timeout on a live monitor never fires (seen on the Pixel 8 Pro, ++ // quickshell 0.3.2): switch the monitor off and on so it starts again. ++ property bool idleRearming: false ++ onFirstIdleTimeoutSecondsChanged: { idleRearming = true; idleRearmTimer.restart() } ++ Timer { id: idleRearmTimer; interval: 50; repeat: false; onTriggered: root.idleRearming = false } ++ + IdleMonitor { + id: idleMonitor +- enabled: root.idleEnabled && root.idleTimersEnabled ++ enabled: root.idleEnabled && root.idleTimersEnabled && !root.idleRearming + timeout: Math.max(1, root.firstIdleTimeoutSeconds) + respectInhibitors: true + onIsIdleChanged: root.handleIdleChanged() diff --git a/packages/omamobile-omarchy/test/source-family.py b/packages/omamobile-omarchy/test/source-family.py index c2a881b3a..09a496da3 100644 --- a/packages/omamobile-omarchy/test/source-family.py +++ b/packages/omamobile-omarchy/test/source-family.py @@ -17,5 +17,14 @@ else: raise AssertionError('unsupported source family accepted') -assert len(list((package / 'legacy-4.0.6').glob('*.patch'))) == 29 +# Pinned, not counted (L-637): a new legacy fix adds a name here instead of +# breaking a literal count that every other PR also bumps. +legacy = {p.name[:4] for p in (package / 'legacy-4.0.6').glob('0*.patch')} +retained = {'0001', '0003', '0005', '0006', '0007', '0008', '0009', '0010', + '0011', '0012', '0013', '0014', '0015', '0016', '0017', '0018', + '0019', '0020', '0021', '0022', '0023', '0024', '0025', '0026', + '0027', '0028', '0029', '0030'} +missing = retained - legacy +assert not missing, 'legacy archive lost %s' % sorted(missing) +assert (package / 'legacy-4.0.6/bridge-4.0.4-menu-first-frame.patch').is_file() print('PASS: actual selector rejects unsupported families; legacy archive retained') diff --git a/packages/omamobile-omarchy/version b/packages/omamobile-omarchy/version index 5946febf1..352e98e2f 100644 --- a/packages/omamobile-omarchy/version +++ b/packages/omamobile-omarchy/version @@ -1 +1 @@ -0.1.48 +0.1.49