Repository navigation
omamobile-shell: recent apps stop a card's live copy before closing its window (the shell restarted) - #985
Conversation
…ts window Flicking a card up, or Clear all, asked the window to close while the card's ScreencopyView was still copying it. The compositor ended the copy with the window, the shell's Wayland connection failed with "fatal error: Invalid argument", and the whole shell restarted, home screen and all. The copy now stops first: a flicked card drops its source before it flies off and the window is asked after that, Clear all drops every card's source and asks 120 ms later, and a window that stays gets its copy back.
derekross
left a comment
There was a problem hiding this comment.
Thank you for this, and for finding it in the journal rather than guessing: a shell restart on a flick in recent apps is exactly the kind of thing an owner can't report usefully.
I read the change and ran test/switcher-touch on your branch merged with today's main: 18 pass. Taking card.closing out of the copy's binding fails your two flick cases, and leaving closingAll false fails the Clear all case, so all three bite. The checks are green on today's main and it merges cleanly with the other shell pull requests open now.
What your tests can't show is whether Quickshell's real ScreencopyView stops its capture as soon as its source becomes null; your 16 flicks without a restart say it does on the 9a. Since recent apps is the same on every phone, I'll run it on my Pixel 7 Pro before it merges: flicks, Clear all (which hasn't run on a phone yet), and a look at what a card shows while it flies off with its copy stopped. I'll set the version when it merges. Nothing more is needed from you unless that run finds something.
derekross
left a comment
There was a problem hiding this comment.
I ran this on my Pixel 7 Pro today, built from your head merged with today's main, together with #985, #986 and #994 in one shell build (they touch different files).
Recent apps: flicking a card up closes its window and the card flies off cleanly, five times with fresh windows (foot twice, Chromium); Clear all with three windows closes them all and dismisses recent apps. No fatal error, no shell relaunch in the journal for the whole session, one Quickshell throughout. It passes on the 7 Pro. It needs the next free shell number at merge; I'll push that to your branch (main merged in) and squash it once CI is green.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closing an app from recent apps could restart the whole shell: the bar, the home screen and every plugin went away and came back a few seconds later. The owner of my palmtop had seen it several times; this morning the journal had it.
What happened. A card in recent apps shows a live copy of its window (
ScreencopyView,live: true). A flick up asked the window to close while that copy was still running. On the palmtop (Pixel 9a, Hyprland 0.57.0-3.3, quickshell 0.3.2.r7, Omarchy 4.5.0-3), in one second:The shell's own log ends with the
closewindowevent andToplevelHandle … closed. I have not found which request the compositor refuses once the window is gone, only that it comes from a copy that is still running: with the copy stopped first it doesn't happen.The change, in
omamobile.switcher/Switcher.qmlonly:On the palmtop. With the same change made by hand in the installed
Switcher.qmland the shell reloaded, the owner flicked apps closed, 16 windows in all by the journal, and the shell stayed up: nofatal errorand norelaunchingline since. He did not use Clear all (the journal has no "clear all, closing" line), so that half has run in the tests only.Tests.
test/switcher-touch.qmlgains three cases, with the stub window noting how many cards still copied it when it was asked to close: a flicked card has stopped copying by then, a window that stays after a flick gets its copy back, and Clear all stops both copies before either close. Takingcard.closingout of the binding fails the first two; leavingclosingAllfalse fails the third. Three older Clear all cases wait for the close now that it comes 120 ms after the tap.tests/allandtools/pr-check origin/mainpass. The package's owntest/allpassed on a quiet machine; in two earlier runs with the laptop loaded (load average about 9) it failed once on "overlapping power-key presses" with "delay 1 produced wrong screen state or brightness", and once on "the keeper is a plain cat on the pty", different tests each time and none of them the switcher's. I haven't checked whether main does the same under that load.Not run: a Pixel 7 Pro, Clear all on a phone, and the built package (the palmtop has the one file changed by hand).
versionis untouched; set it when it merges, as with the other shell pull requests.