The launcher button, app icons and taskbar entries were custom elements
with click handlers only: none could be focused, named or activated from
the keyboard, and the launcher overlay neither took nor returned focus.
They are now buttons with accessible names and a visible focus ring. The
launcher is a modal dialog that a Super tap or the Apps button opens
with focus on its first app; Tab moves between apps, Enter opens one and
Escape or another Super tap closes it, returning focus to the Apps
button. Each taskbar entry has an activate and a close button reachable
with Tab, and focus moves to a remaining control when an entry closes or
goes away. Notifications, including the offer to force quit, are
announced as status.
Servo does not tell the document when its window loses keyboard focus,
so weft-servo-shell calls window.weftShellBlurred() then and the launcher
closes; the next Super tap opens it again. Servo does not evaluate
prefers-reduced-motion either, so the page has no transitions.
tests/frame/check_system_ui.py drives the real page on the nested
desktop with keys: opening apps from the launcher, reaching the shell
with a Super tap from an application, a Super chord that stays with the
app and leaves no Super modifier held there, activating and closing apps
from the taskbar, the launcher closing when the shell loses focus, and
toggling it. It fails without the compositor's Super handling or the
focus-loss call.
The catalog followed the store's directory listing, so the launcher's
order, and with it its keyboard order, could change between scans. Apps
are listed by name, ignoring case, then by ID.
From an application window there was no keyboard path to the system
shell: only a pointer click on the taskbar strip raised the panel.
The Super keys now belong to the compositor and are never delivered to
an application. A tap, Super pressed and released without another key,
activates the shell's panel, raising it with keyboard focus, and then
delivers the tap to it so the shell can open its launcher; a key or a
pointer button pressed meanwhile makes it no tap. Keys pressed while
Super is held reach the focused window with the Super modifier: a client
is sent the modifiers whenever a key the compositor takes changes them,
so none stays held there. With several panels, the first registered one
is the shell's.
Pruning compared a list of the declared capabilities with the set of
approved ones by length. A manifest repeating a capability could
therefore keep an approval it no longer declared. The two are now
compared as sets.
weft-pack approve <id> <capability>... replaced the app's approval
instead of adding to it. It also accepted any app ID and any
capability, which let an approval cover a capability declared later. It
now adds to the approval, requires the app to be installed, and for a
package weft-pack can read, requires each listed capability to be
declared. The docs state the remaining limits for verified images.
weft-pack approve read only the user store, so an app in the system
store, or installed as a verified image, could not be approved. The
remedy the launch refusal named also did not work.
approve now resolves the package in weft-appd's store order. It also
accepts the capabilities by name, which is how an image is approved,
since weft-pack cannot read its manifest.
An install or rollback without --approve now drops approvals for
capabilities the package no longer declares. A capability declared
again later therefore asks again. Both commands report what still needs
approval. weft-appd validates capabilities without side effects first,
then refuses unapproved ones, then derives grants, so an unsupported
capability is reported as such and not as one needing approval. The
docs state that approvals are per user.
Every capability a package declared was granted at launch, so a signed
package received all the permissions it asked for. Blueprint 5.2 rules
that out.
A package now gets only the capabilities the user approved. weft-pack
install --approve approves those the installed package declares, and
weft-pack approve <id> approves those of the installed app later.
Without approval, install lists what still needs it. The approval is
recorded in $XDG_DATA_HOME/weft/approvals/<id>. weft-appd refuses to
launch an app declaring a capability the record does not hold, with
403 and the capabilities named, after refusing unknown or unsupported
ones as before.
An update that declares a new capability needs approval again, and
uninstalling forgets the approval. Private app data is a minimal
execution resource and needs no approval, so Notes and the existing
fixtures are unchanged.
Unit tests cover the approval record, install and approve, an update
adding a capability, uninstall, and appd refusing and then launching.
tests/frame/check_update.py launches a real app declaring notifications:
it is refused until weft-pack approve, then runs.
The test also covers the refusal reported when no other store has the
app. The new comment states that a package found and then refused is not
replaced by another store's copy. The architecture doc says that a
re-signed copy of the same content is visible at once.
Installing the same content with another signature file gives the same
revision name. The existing revision, possibly the active one, was
removed before the new copy was renamed into place, so a failure in
between left the store link pointing at nothing. The new copy now
replaces it in one exchange.
If an activation fails before its switch, the kept rollback link is
restored, and dropping a stale rollback link is flushed. The staging
claim is released once the copy is placed, so launches are not refused
while the operation finishes. A launch now passes over a store whose
entry for the app is unusable, as the listing does.
An update of a package directory from before revisions removed it
together with the app data an earlier weft-appd kept in its data
directory. That data is now moved out under the uninstall rules first,
or the update stops.
A failure after the store link was switched removed the new revision
while the link pointed to it. The switch is now the commit point;
cleanup after it is left to collection.
Other fixes:
- A revision is reused only when its content and signature file match.
- The revisions directory is flushed before activation.
- A rollback link is not inherited by a new installation, and rollback
refuses a link to the active revision.
- Staging and unpacking directories are held while in use, so another
operation never collects them.
- weft-appd refuses a launch, instead of waiting, while a package
operation holds the revision.
- Listings read only an app's active package.
check_update.py installs a test app with weft-pack, runs it with the
real runtime and app shell, and checks the following:
- an update leaves a running session on the bytes and the revision it
started from;
- a failed update keeps the active revision;
- a later launch gets the update;
- the old revision is collected only after its session ends;
- rollback reactivates the kept revision;
- uninstall refuses new launches without disturbing a running session,
and a later uninstall removes the revisions.
An installed package could not be updated: install refused it, and
uninstalling and reinstalling it was neither atomic nor safe for running
sessions, which read files from the package directory.
A package is now staged, checked, verified, admitted and flushed. It is
then renamed to an immutable revision named by its content digest,
<store>/.revisions/<id>/<digest>, and activated by one rename of the
link <store>/<id>. A failure or interruption at any point leaves the
previously active revision active, and a failed first installation
leaves nothing installed. The revision active before an update is kept,
and weft-pack rollback makes it active again after checking it against
the owner record. Other revisions are collected by later operations on
the app, unless a session still runs from them. Leftovers of interrupted
operations are collected too.
weft-appd follows the store link only to one of the app's own
revisions. It runs a session from the revision directory and holds a
shared lock on it for the session's lifetime, so an update, rollback or
uninstall never changes or removes the bytes of a running session. A
package directory from before revisions is still read. An update
replaces it in one exchange, and only while no session runs from it.
Repeated close requests could fill the stop queue, so a forced stop sent
after them was dropped while the session was reported as stopping. A
close is now queued only into an empty queue, which leaves room for a
forced stop.
A stop requested while a session was starting could still be queued
when the app shell reported ready. The session was then shown as
running and asked to close, instead of being stopped. The supervisor
now checks for that request before it marks the session running.
Stop requests use a small bounded queue. A repeated request on a
stopping session is neither queued nor broadcast again; only a forced
one is sent. The taskbar's Force quit returns to a normal close when
the entry is activated, or 20 s after it is offered.
An application with the ask close policy could decline every close, and
nothing could end it. TERMINATE_APP now takes force, which terminates
the session without asking. The taskbar offers it as Force quit once an
app has had longer than the close timeout to answer.
The close interaction now comes before Running -> Stopping, as blueprint
6.2 requires. The session stays running while the application answers,
and a declined close no longer moves Stopping back to Running. Stop
requests reach the supervisor on a channel, so a repeated or forced
request during the close wait is seen without registering again. A
declining window is brought to the front, so its prompt is visible. A
clean exit after a close request is recorded as a close on request. A
decline report is recognised after page output that lacks a newline.
Notes keeps a pending Save and close when asked again. It saves text
typed during that save before closing, and reports when it cannot save
because it is not connected.
A package declares its unsaved-change policy in [ui].close. With
"ask", the app shell dispatches a cancelable weftclose event before
the window closes and waits up to 2 s for the page. A page that
cancels the close keeps running, and the app shell reports this to
weft-appd with its readiness token, which returns the session to
running. The page closes itself later with window.close().
Notes declares "ask". With unsaved changes it offers Save and close,
Close without saving, and Cancel. It closes after a save only once the
save is acknowledged. The taskbar shows a declined close as running
again.
TERMINATE_APP broadcasts the Stopping state, so every system UI marks
the entry. A closing taskbar entry is marked once and no longer sends
ACTIVATE_APP. The docs describe which stopped sessions are kept.
A repeated TERMINATE_APP during the close wait no longer removes the
session from the registry. The close wait also watches the runtime and
the IPC relay, and reports a failed app shell exit as a failure rather
than a close. A session being closed is not saved for restore, only the
32 most recent stopped sessions stay registered, and the taskbar shows
an entry as closing until its session stops.
TERMINATE_APP, which the taskbar sends, killed the session's processes
at once, so an application had no chance to finish, for example to
save. A running session is now asked to close through the compositor
(AppCloseRequest, which sends xdg_toplevel close to its windows) and
the app shell is given five seconds to exit by itself before what
remains is terminated. The stop reason records whether the app closed
or was terminated after the timeout. TERMINATE_APP replies stopping and
the session stays registered until it settles; a starting session is
stopped at once, and appd shutting down terminates sessions without a
close.
check_counter.py requires the compositor to ask the session's window
to close and the app shell to exit with status 0 on the close; a unit
test requires an app that ignores the close to be terminated after the
timeout and not before.
The software rendering path (softbuffer) and the EGL path keep their
own Wayland objects on winit's display, so dropping the rendering
context after the event loop could destroy proxies on a disconnected
display just like the shell client did. Both hosts now release the
rendering context and the window in winit's exiting handler as well.
The compositor records the keys whose press a shortcut took and takes
only those releases, so no client sees a release without its press or
keeps a key pressed. check_activation.py watches the panel for six
seconds after Alt+F4 instead of sampling it once.
There was no compositor-owned way to close an application window. Alt+F4
is now taken by the compositor: it sends xdg_toplevel close to the
focused application window, never the panel, and the key does not reach
the client.
Closing exposed a crash in both Servo hosts: their shell-protocol
client, created on winit's Wayland display, was dropped after that
display was torn down, so wl_proxy_destroy touched freed memory and
the process ended with SIGSEGV. The hosts now release Servo and the
shell client in winit's exiting handler, while the display is alive.
check_activation.py closes the focused application with Alt+F4 and
requires its session to stop with the app shell exiting with status 0,
the window to disappear, and Alt+F4 with the panel focused to leave
the panel in place.
A shell restarted while applications run took keyboard focus before it
registered as the panel and kept it after being lowered beneath them;
the window in front now gets it. Without an output, windows are still
reordered, so a window that maps without taking focus does not cover
the one in front.
Laying windows out re-mapped every application window, which smithay
puts on top, so a session mapping another window, an exclusive zone
change or an output resize pushed the shell's home back under the
applications while it kept keyboard focus. Placement now re-maps every
window in its current order. Panels are lowered only when they
register, and a window that maps without taking focus goes beneath the
window in front, so a session cannot cover the shell's home or another
application by creating windows. A panel's zweft window that is
destroyed while its surface lives also removes its window slot.
With applications filling the work area, the system UI's launcher, drawn
in the panel beneath them, could not be seen while any application was
open. Clicking the panel now brings it to the front as the shell's home
until an application is activated again.
A panel that is destroyed, or whose client goes away, releases its
reserved strip and the applications are laid out again; dead panels no
longer count toward the work area, so a restarted shell does not reserve
the strip twice. A work area is never configured with a zero size. The
zweft_shell configure for an application window, at creation and in
reply to set_geometry, reports the work area the layout gives it, and a
panel's reports the output.
check_activation.py now clicks the taskbar strip, requires the panel to
cover both applications, and activates one back.
Application windows opened at the client's default size at the origin,
so one as large as the output hid the taskbar with no way back.
zweft_shell_window_v1 version 3 adds set_exclusive_zone: a panel
reserves a strip along an output edge, and other windows get the new
invalid_exclusive_zone error. weft-servo-shell reserves its 48-pixel
taskbar at the bottom (TASKBAR_HEIGHT, matching --taskbar-height in the
system UI). The compositor computes the work area as the output less the
reserved strips and configures every application window to fill it,
again when the output or a reservation changes.
The desktop harness now uses a 1400x900 X screen so the nested
compositor's whole 1280x800 output is captured. check_activation.py
requires both applications to fill the work area and end at the
reserved strip; check_notes.py finds the Discard button from the window's
right edge and check_confinement.py samples its probes from the measured
page instead of a fixed 800x600 window.
Unmapping a closed window made a session with no mapped window count
as new again, so destroying and recreating its only window took
keyboard focus from the application the user had activated. The
compositor now remembers which sessions already received focus on map
until the session ends.
When the focused window closed, keys went to a dead surface until the
next click; the topmost remaining application window, or the panel,
now gets focus. Only a session's first window takes focus when it
maps, so a client cannot take keystrokes meant for another application
by creating windows. A panel is fitted and kept beneath however the
shell orders its requests, and focusing the panel clears the
applications' activated state. ACTIVATE_APP is refused while the
compositor is not connected rather than queued.
check_activation.py now also ends the focused application and checks
that keys reach the remaining one.
The system shell's panel was an ordinary toplevel at winit's default
size, stacked by map order with the applications, and clicking or the
taskbar could never bring an application back to the front.
The compositor now sizes the panel to the output and keeps it beneath
every application window. A newly mapped, clicked or activated
application window is raised, marked activated and given keyboard
focus. weft-appd accepts ACTIVATE_APP for a running session and asks
the compositor to activate that session's window (AppFocusRequest),
and the system UI's taskbar entries send it when chosen.
check_activation.py runs the system shell with a solid panel page and
two test applications: the panel fills the output beneath them, each
launch comes to the front with keyboard focus, ACTIVATE_APP switches
between the sessions with focus, and activating a session that is not
running is refused.
The session file is read and removed at startup, and restoring now runs
in its own task, so a shutdown during the restore would have saved only
the apps launched so far. Until the restore finishes, a shutdown stops
it and saves the restored list unchanged.
Frames queued for a slow appd were sent only on later traffic, so the
end of a burst could wait indefinitely. A timer now retries the flush
every 20 ms, armed only while frames are queued. weft-appd restores the
previous session in its own task, so waiting for the compositor no
longer delays clients or shutdown, and the security docs describe the
launch refusal and the backlog limit exactly.
A full socket buffer toward a stalled appd closed the connection and
with it every app. Frames for appd are now queued whole and flushed on
each send and read, and only a backlog beyond the frame limit or a
write error ends the connection. A disconnect report is applied only
when it comes from the session's current client, so a client closed
with an earlier appd cannot remove the mapping of a new session that
reused its ID. A failure to watch a new appd connection no longer
leaves the compositor refusing every later one.
weft-appd refuses a launch with 503 before anything starts while the
compositor is not connected, and waits up to 10 s for the connection
before restoring the previous session.
Session clients could still create layer-shell surfaces, including
full-screen overlays with exclusive keyboard input, and bind the input
method, which bypassed the refusal of shell roles. Both globals are now
hidden from clients bound to a session.
The compositor IPC connection is tracked by its read source, so a write
error can no longer let a second peer feed the same buffers; a failed
write shuts the connection down. An undecodable or oversized frame ends
the connection, since descriptors could otherwise pair with the wrong
messages, and the descriptor limit counts only descriptors no message
claims, so a burst of launches is not taken for abuse. When appd's
connection ends, the compositor closes the clients of the sessions it
attached.
weft-appd notices when the compositor closes the connection, resends a
message whose write failed after reconnecting, and refuses a launch
while the compositor is not connected instead of starting an app shell
that can never connect.
The compositor stored appd's (pid, session) announcements and never used
them, so no surface could be attributed to a session and any client
could claim any app ID or the panel role.
weft-appd now creates a connected socket pair for each session, gives
the app shell one end as standard input with WAYLAND_SOCKET=0 and no
WAYLAND_DISPLAY, and sends the other end to the compositor with the
session and app ID over the compositor IPC socket (SCM_RIGHTS). The
compositor inserts it as a client bound to that session: holding the
connection is the session's identity. A session's zweft_shell windows
carry its app ID, the panel and overlay roles are refused to sessions
with a new role_not_permitted error, the session's first toplevel is
reported to appd, an ended session's client is closed, and a client's
disconnection is reported. The compositor accepts one appd connection
at a time.
The counter desktop check now requires the compositor to bind the app's
client to its session and to close it when the session is terminated.
Claiming data does not depend on finding earlier-layout data, so an
install that claims it no longer needs HOME. Tests cover a first launch
and a first install with an unusable HOME refusing and recording no
owner, and the security docs state the HOME requirement.
Without an absolute HOME the earlier data layout could not be checked,
so a first-launch or install owner record was written anyway and that
data was migrated to the new owner later. Both now refuse instead.
Uninstall keeps an owner record while data exists in either layout, or
while it cannot tell. Launch tests use a private HOME, and the test
data-home cleanup never removes the running process's own.
App data in the earlier layout, <home>/.local/share/weft/apps/<id>/data,
is migrated to the app data directory after the owner check, so a
trusted package from another store could be recorded as owner on its
first launch and then receive that data. Both layouts now count as
existing data, in weft-appd and in weft-pack install, so unowned data
is only given away with --claim-data. The refusal says how to claim
it. Stale test data homes are removed only when their process has
exited, and the app-data check records the owner of the data it seeds.
The manifest is now read once, and its bytes must match the verified
inventory, so a manifest swapped in around the check cannot grant
capabilities or entries the owner did not sign. A trusted package with
no owner record is recorded as its signer's on its first launch, and
app data without a recorded owner is refused rather than handed to the
first publisher, matching weft-pack's --claim-data rule. A damaged
trust store or owner record is a host error (500), and the trust store
is not consulted for development content.
Supervisor tests use a private data home and an empty trust store; the
counter check runs with a private home, and the notes check records
the owner of the data it seeds.