How the shell draws

ztMETRO is the shell and the Wayland compositor in one. Every frame it draws the whole screen in one GLES2 pass, layer by layer, bottom to top, in a fixed order. Your app is one of those layers. Below, layer 01 is in front, because it is painted first, and each later layer stands further back.

The picture

The same layers as one picture, with what they mean. Open it for the full size.

The ztMETRO frame at the left, and its ten layers spread out in perspective to the right, bottom to top: Start and the app list, frost strips, app window, keyboard, status bar, action centre, nav bar, lock screen, call, volume and toasts, with layer 01 in front and Start cut into its tilesThe ztMETRO frame at the left, and its ten layers spread out in perspective to the right, bottom to top: Start and the app list, frost strips, app window, keyboard, status bar, action centre, nav bar, lock screen, call, volume and toasts, with layer 01 in front and Start cut into its tiles
One frame of ztMETRO on the S9 and its layers: 01, painted first, in front; 10, painted last, at the back. Open it full size.

The layers are screenshots of ztMETRO on a Galaxy S9, cut apart along the shell's own lines (status bar 28 points, nav bar 40). Wi-Fi network and carrier names are covered, and the notification in the action centre is replaced with a demo one. The call screen is not a capture: it is drawn with zrnui by gen/layers.c, because we do not place a real call for a picture. The order and the names come from render_frame in ztmetro/ztmetro.c (ztOSMobile, read on 21 November 2026).

Apart and back

The frame you see comes apart into its ten layers and folds back. Start is built from its tiles, each its own texture in the shell, laid in their places. The clip starts with every layer stacked flat, 01 in front.

The order, bottom to top

This is the order render_frame draws in; a later layer covers an earlier one. The numbers are the picture's; a dash marks a step that is not in it.

#LayerWhat the shell drawsIn the code
–BackgroundThe screen is cleared to the shell background (white in Light, black in Dark). Only the gaps between Start's tiles show itglClear, shell_bg_color
01Start and the app listThe tiles, each its own texture, and the list beside them. In the turnstile each tile moves on its own clock. Not drawn at all while an app at rest or the lock screen covers themtiles, items; skipped when app_covers or lock_covers
02Frost stripsWhat of Start and the list passes under the status bar and the nav bar, blurred into two strips right after Start is drawn, and blurred again only when what is under them changes. Each strip is laid on the screen just under its own bar (step 05 and 07), as the bar's backing. Over an app the bars are opaque and there is no frostfrost_prepare, frost[0], frost[1]
03App windowYour window, between the bars. The app's buffer is already a GPU texture; the shell draws it as a quad. Or the switcher's cards, or the launch flip in landscapedraw_app_surface, wlr_surface_get_texture
–HyperscanThe shell's search page, when it is up (not in the picture)hyper_layer
04KeyboardThe on-screen keyboard, sliding up from the nav barosk_layer
–The turnWhile the screen rotates, a picture of the old layout over the new one (not in the picture)rot_snapshot_draw
05Status barSignal, battery, clock; the charging plug and the taller row you get by holding itstatus_layer, plug_layer, peek_layer
06Action centreThe panel pulled down from the top: quick actions and notificationsshade_layer
07Nav barBack, Start, search. Drawn after the action centre, so the panel comes down behind itnav_layer
08Lock screenIts picture, clock and notification row. Opaque: while it is fully down, Start and the apps under it are not drawn, and while it slides only the strip below it islock_layer, lock_clock_layer
09CallThe phone app's window (ztphone) drawn again here, over the lock, with the status row over itcall_over_lock
10Volume, toasts, dialogsThe volume banner and a notification toast in the same place at the top, and the shell's dialogsvolume_layer, toast_layer, dialog_layer

The boot splash is left out too. One exception to "one pass": when your app is at rest and fills its area, the shell may put its buffer straight on a display plane (plane_pick) instead of drawing it, if the display hardware accepts it.

Textures and what is drawn each frame

The shell moves the apps

Because every app is a layer of the same frame, the shell, not the app, animates going between them: Start's tiles turning away and an app swinging in (the turnstile), an app swinging out on Back, the switcher's cards, the launch flip in landscape, and the turn of the screen. Every app arrives and leaves the same way, and an app needs no code for it.

What it means for your app

Checked against zrn-sdk commit 71a5ace (SDK v2). Pictures and clips are drawn by zrnui's GLES2 renderer, offscreen, from code that compiled, against the zrn-sdk working tree on top of that commit (it adds the app bar measured on a Windows Phone 8.1 phone and the Segoe WP font lookup), in Segoe WP. Source and proof.