CI / test (push) Failing after 51s
- Rotate the display 0/90/180/270 degrees in the KMS host, with scanout and libinput touch/pointer coordinates transformed to match - Add a touch "Rot" pill beside "KB": tap turns 90 CW, long-press or right-click flips 180 - Add `chandra-ctl rotate [cw|ccw|flip|0|90|180|270|status]`; CHANDRA_ROTATE sets the initial orientation - Add session/chandra-auto-rotate, which follows iio-sensor-proxy orientation (disable with CHANDRA_AUTO_ROTATE=0) - Advertise window_menu, maximize, fullscreen and minimize via xdg_toplevel.wm_capabilities (xdg_wm_base v5+) - Add docs/handset.md covering handset touch, scaling, OSK and rotation
3.9 KiB
3.9 KiB
Handset & Touch Support
Chandra includes KMS/libinput/compositor adaptations tailored for mainline Linux smartphones (verified on OnePlus 6T oneplus,fajita at 1080x2340).
Display Scaling (CHANDRA_SCALE)
- Integer scaling lives in
compositor/kms/kms_stub.c. - Setting
CHANDRA_SCALE=N(or the default automatic2xscaling on dense portrait phone panels such as1080x2340) runs the compositor at a legible540x1170logical resolution while presentingNxnearest pixels to hardware dumb buffers and cursor planes.
Icon Desktop & Compact Panel
- Icon desktop default: Portrait handset layouts prioritize the touch-friendly icon desktop launcher aesthetic.
- Compact panel layout: Panel items (
launcher,dock,session-settings,network,battery,clock-digital,screenshot) size compactly so all controls fit cleanly within540pxportrait width without clipping, with fuel-gauge support (e.g.bq27411-0).
Touch Input & On-Screen Keyboard
- Long-press right-click: In
compositor/kms/kms_stub.c, a stationary touch held for500 msconverts to a synthetic right-click (BTN_RIGHT) via atimerfd, allowing context menus and secondary actions without a mouse. - Built-in OSK:
compositor/host/osk.mbtprovides a 5-row virtual keyboard that opens automatically when Wayland text input (zwp_text_input_v3) gains focus and can also be toggled manually from the bottom-rightKBpill.
Display Rotation, Flip, and Auto-Rotate
- 4-way transform (
0°,90° CW,180°,270° CW): Handled end-to-end acrosscompositor/kms/kms_stub.c,wit/host/display.wit,wasmhost/bin/display.mbt, and the compositor event loop (CHANDRA_ROTATEsets the initial orientation). Both scanout rows and libinput touch/pointer coordinates transform to match the active orientation. - Touch
Rotpill: Sitting left of theKBpill incompositor/host/osk.mbt:- Tap: rotate
90°clockwise (0 -> 90 -> 180 -> 270 -> 0). - Long-press / right-click: flip
180°(0 <-> 180,90 <-> 270).
- Tap: rotate
- CLI control:
chandra-ctl rotate [cw|ccw|flip|0|90|180|270|status]queries or changes rotation live (0portrait,90/270landscape,180inverted). - Sensor auto-rotate: When running on the DRM backend (
chandra-session) withmonitor-sensor(iio-sensor-proxy) installed,session/chandra-auto-rotateruns inside the activeseat0session and applies orientation change events (normal -> 0,right-up -> 90,bottom-up -> 180,left-up -> 270) without fighting manualRottaps while stationary. SetCHANDRA_AUTO_ROTATE=0in the session environment to disable auto-rotate.
Client-Side Window Controls (Chromium / GTK)
compositor/wayland/server.mbtemitsxdg_toplevel.wm_capabilities(window_menu,maximize,fullscreen,minimize) forxdg_wm_basev5+ clients so client-decorated apps expose Maximize alongside Close.- On GTK/Chromium setups where GNOME defaults (
org.gnome.desktop.wm.preferences button-layout) omit maximize/minimize (e.g.'appmenu:close'), configure GTK andgsettings:~/.config/gtk-3.0/settings.iniand~/.config/gtk-4.0/settings.ini:gtk-decoration-layout=:minimize,maximize,closegsettings set org.gnome.desktop.wm.preferences button-layout ':minimize,maximize,close'
Keyring Unlock
session/chandra-sessionstartsgnome-keyring-daemon --start --components=secretsand unlocks an unencrypted defaultlogin.keyringat login over D-Bus (org.freedesktop.Secret.Service.Unlock) so apps such as Chromium store credentials without blocking prompts.