4212 Commits

Author SHA1 Message Date
Geoffrey McRae
0c21577e9e [client] render: optimize software surface fills 2026-08-12 05:31:45 +10:00
Geoffrey McRae
5e8066609a [client] egl: track software surface damage 2026-08-12 05:20:56 +10:00
Geoffrey McRae
1a236c5e3a [client] egl: upload software surface damage only 2026-08-12 05:20:56 +10:00
Geoffrey McRae
fd862e21cf [client] ci: install Xvfb for render tests 2026-08-12 05:05:27 +10:00
Geoffrey McRae
bd5d07fa4f [client] render: reject empty cursor images 2026-08-12 05:05:27 +10:00
Geoffrey McRae
fbcf71e777 [client] config: reject malformed window geometry 2026-08-12 05:05:27 +10:00
Geoffrey McRae
db1c8bf671 [client] message: reset resize debounce state 2026-08-12 05:05:27 +10:00
Geoffrey McRae
51006f9f76 [client] scheduler: retain pending control flags 2026-08-12 05:05:27 +10:00
Geoffrey McRae
f8cf0740e3 [client] keybind: validate and consume chord events 2026-08-12 05:05:27 +10:00
Geoffrey McRae
7b5936574c [client] keybind: release guest chords in reverse 2026-08-12 05:05:27 +10:00
Geoffrey McRae
9cbf24690b [client] x11: reject null clipboard payloads 2026-08-12 05:05:26 +10:00
Geoffrey McRae
1c7664dc5c [client] wayland: release ignored clipboard offers 2026-08-12 05:05:26 +10:00
Geoffrey McRae
6525c3a759 [client] lgmp: restore held mouse mode 2026-08-12 05:05:26 +10:00
Geoffrey McRae
53dd7c8116 [client] keybind: test app dispatch lifecycle 2026-08-12 05:05:26 +10:00
Geoffrey McRae
469e0c5f02 [client] x11: test clipboard protocol lifecycle 2026-08-12 05:05:26 +10:00
Geoffrey McRae
eb8b46eac9 [client] keybind: test built-in actions and ordering 2026-08-12 05:05:26 +10:00
Geoffrey McRae
fc7c8e9cae [client] render: test X11 display paths 2026-08-12 05:05:26 +10:00
Geoffrey McRae
1f5aaa0fc3 [client] wayland: test clipboard protocol lifecycle 2026-08-12 05:05:26 +10:00
Geoffrey McRae
c68007ccd6 [client] render: test scaling and OpenGL paths 2026-08-12 05:05:26 +10:00
Geoffrey McRae
8399c38bab [client] egl: test DMA snapshot lifecycle 2026-08-12 05:05:26 +10:00
Geoffrey McRae
c6752237d9 [client] timing: test frame completion ordering 2026-08-12 05:05:26 +10:00
Geoffrey McRae
a12abedd60 [client] wayland: test presentation feedback lifecycle 2026-08-12 05:05:26 +10:00
Geoffrey McRae
6c0f8d8a28 [client] control: test config and resize messages 2026-08-12 05:05:26 +10:00
Geoffrey McRae
7dc6bc8527 [client] lgmp: test input ownership lifecycle 2026-08-12 05:05:26 +10:00
Geoffrey McRae
ff47bf6128 [client] spice: test session and surface lifecycle 2026-08-12 05:05:26 +10:00
Geoffrey McRae
0d870146b5 [client] clipboard: test provider lifecycle 2026-08-12 05:05:26 +10:00
Geoffrey McRae
28df55e51c [client] egl: test desktop damage geometry 2026-08-12 05:05:26 +10:00
Geoffrey McRae
dea5706667 [client] input: test provider handoff and rollback 2026-08-12 05:05:26 +10:00
Geoffrey McRae
223bb6fd58 [client] scheduler: test frame control lifecycle 2026-08-12 05:05:26 +10:00
Geoffrey McRae
8bf7c5b49e [client] audio: test streams and microphone consent 2026-08-12 05:05:26 +10:00
Geoffrey McRae
49fa27b573 [client] lgmp: test frame validation and leases 2026-08-12 05:05:26 +10:00
Geoffrey McRae
c0ea0368c6 [client] transport: test fallback lifecycle 2026-08-12 05:05:26 +10:00
Geoffrey McRae
b146c0168a [client] tests: cover render source queue 2026-08-12 05:05:26 +10:00
Geoffrey McRae
f1615aa333 [client] display: stop callbacks before state teardown
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2026-08-12 03:08:49 +10:00
Geoffrey McRae
ebc9d076ec [client] overlay: clean up partial initialization 2026-08-12 03:08:49 +10:00
Geoffrey McRae
6ddf1d62cd [client] wayland: clean up failed window initialization 2026-08-12 02:56:05 +10:00
Amit Mendapara
8187177c7f [client] app: free overlays after display server shutdown
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
The render thread freed the overlays as soon as it exited, while the
main thread could still be dispatching display server input callbacks
that iterate them. Free the overlays in lg_shutdown instead, once the
render thread has been joined and the display server has shut down.

The overlays now outlive the renderer, so overlayFreeImage must not
call into it; renderer deinitialization has already destroyed all
textures along with the context.
2026-08-12 02:50:01 +10:00
Amit Mendapara
75f7d614a7 [client] evdev: split teardown into stop and free phases
evdev_stop was never called, and calling it revealed unsafe teardown:
the device list was freed before the thread was joined, a zero epoll
descriptor was mistaken for a valid one, and the device loops walked
past the end of the array through a sentinel that does not exist.

Join the thread in evdev_stop and defer the rest to the new evdev_free.
The display server grab hooks route into evdev until its event thread
is joined, so the device state must stay valid until the display
server has been freed; evdev_free then restores the hooks and releases
the state.
2026-08-12 02:50:01 +10:00
Amit Mendapara
c66a974f1d [client] wayland: marshal resize requests to the event-loop thread
setWindowSize is called from the render, frame and transport threads,
but shellResize issues shell requests and, with the libdecor GTK
plugin, renders the window decorations through pango, none of which is
thread safe. A frame thread exiting after such a call crashed in the
pango fontmap destructor during thread teardown.

Publish the requested size atomically and wake the event loop through
an eventfd registered in the epoll; the poll callback applies the size
on the event-loop thread. Concurrent requests coalesce into the most
recent one.
2026-08-12 02:50:01 +10:00
Geoffrey McRae
574e8edbae [client] transport: recover incompatible sessions
Report expected and current protocol versions through the transport
interface and expose session-independent recovery operations.

Offer recovery from the version mismatch popup, publish requests through
the reserved IVSHMEM channel, and select the validated SPICE fallback.
2026-08-12 00:05:24 +10:00
Geoffrey McRae
bacf376305 [idd] recovery: restore fallback display
Add a protocol-independent recovery channel outside LGMP so clients can
request a usable guest display even when transport versions differ.

Synchronize recovery state with the helper across driver restarts and
restore the configured topology without persisting temporary changes.
2026-08-11 23:50:13 +10:00
Geoffrey McRae
9898e9bcec [common/idd] recovery: reserve IVSHMEM control region
Define a fixed, protocol-independent recovery ABI in the final 64 KiB
of IVSHMEM.

Provide crash-safe multi-client requests and coherent producer status.

Exclude the region from LGMP allocation and frame capacity so future
protocol mismatches retain a stable control path.
2026-08-11 23:50:13 +10:00
Geoffrey McRae
61a49ebaba [idd] common: use CSRWLock throughout the drivers
Make CSRWLock own the native lock and provide scoped guards for shared,
exclusive, early-unlock, and non-blocking use.

Replace direct SRW lock management throughout the IDD, input driver,
and helper while preserving the existing lock scopes.
2026-08-11 23:50:13 +10:00
Geoffrey McRae
2543366f5f [doc] words: add missing words 2026-08-11 21:19:59 +10:00
Geoffrey McRae
33bdc611d8 [docs] guide: document current Looking Glass features 2026-08-11 20:46:46 +10:00
Geoffrey McRae
45429681a0 [client] spice: own transport configuration
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Register SPICE connection and component options in the SPICE transport.
Move generic input and clipboard settings out of the SPICE namespace,
while retaining migration aliases for existing configurations.

Keep PureSpice and usbredir build requirements private to the transport,
and remove obsolete SPICE configuration state from the client core.
2026-08-11 18:31:19 +10:00
Geoffrey McRae
1a6f85eae2 [client] video: switch transport sources
Track primary and fallback video with source-specific generations, and
publish a source only after its first frame or software surface is
ready.

Route SPICE surfaces and cursors through the generic render queue. Keep
the current image across handoffs, and switch input only after the new
source has been presented.

Move fallback activation to its worker so display callbacks cannot
block or deadlock the render path.
2026-08-11 18:31:19 +10:00
Geoffrey McRae
053d4e9d9b [client] transport: manage persistent fallback sessions 2026-08-11 16:16:19 +10:00
Geoffrey McRae
5b12685e3c [client] spice: move protocol into transport 2026-08-11 15:33:53 +10:00
Geoffrey McRae
2bd0db1a26 [client] renderers: generalize software surface updates 2026-08-11 15:07:35 +10:00