Commit Graph

2243 Commits

Author SHA1 Message Date
Geoffrey McRae
1a236c5e3a [client] egl: upload software surface damage only 2026-08-12 05:20:56 +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
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
Geoffrey McRae
5cf5dcfe05 [client] providers: handle fallback disconnects safely 2026-08-11 15:06:45 +10:00
Geoffrey McRae
96a5cf4ce8 [client] transport: split video provider operations 2026-08-11 15:05:00 +10:00
Geoffrey McRae
eb6bb78db9 [client] transport: encapsulate transport instances 2026-08-11 14:53:29 +10:00
Geoffrey McRae
77b661194a [client] input: fix automatic keyboard capture
Treat autoCapture as keyboard ownership while the pointer is inside the
guest viewport. Predict the next local position for both absolute and
relative motion, then release the keyboard before the pointer crosses
an edge.

Keep capture, focus, and deferred evdev transitions consistent while
retaining the latest local position as the prediction baseline.
2026-08-11 14:43:48 +10:00
Geoffrey McRae
d20904e3af [client] input: stop absolute cursor feedback
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
X11's legacy guest-position synchronization warps the host cursor to
delayed guest updates. With absolute input this feeds old positions back
through cooked motion and pulls the cursor away from window edges.

Skip display-server guest synchronization when the active input is
absolute. Relative input and explicit uncapture alignment are unchanged.
2026-08-10 19:29:22 +10:00
Geoffrey McRae
89dcf56073 [client] X11: release pointer after capture
Normal input now uses absolute positioning, so retaining the XI pointer
grab after capture leaves no later path to release it.

Always release the grab so leaving the window works again and the
uncapture path can align the host cursor to the guest position.
2026-08-10 18:47:27 +10:00
Geoffrey McRae
4afb0254d1 [client] X11: test grabbed input routing
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
Keep raw and cooked event selection inside the tested X11 policy.

Exercise grab transitions and held-key normalization directly.
2026-08-10 18:19:33 +10:00