Compare commits

...

226 Commits

Author SHA1 Message Date
Geoffrey McRae
b069a2363c [idd] project: cleanup vcxproj.filters mess
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-06-03 22:48:23 +10:00
Geoffrey McRae
b77b36aff0 [idd] ipc/helper: notify the helper if a software renderer is in use 2026-06-03 22:48:16 +10:00
Geoffrey McRae
b3701992c1 Merge pull request #1277 from quantum5/idd-no-gpu-warn
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
[idd] helper: implement warning when there is no GPU
2026-06-03 21:39:00 +10:00
Geoffrey McRae
7b2c60b267 Merge branch 'master' into idd-no-gpu-warn 2026-06-03 21:35:08 +10:00
Quantum
708ed2cbae [idd] helper: add mode list reset button 2026-06-03 21:32:35 +10:00
Quantum
415a946e56 [idd] helper: avoid potential empty option deference 2026-06-03 21:32:35 +10:00
Geoffrey McRae
803aea0d21 [idd] ipc: implement reporting of GPU software status 2026-06-03 21:31:08 +10:00
Quantum
cb70643fa4 [idd] helper: load default mode list with default refresh rate
After 882d531792, the existing code in the
helper reads past the end of the array for refresh rate, which is broken.

This PR also refactors the default modes into a getDefaultModes method so
that it can be used for a reset feature later.
2026-06-03 17:03:50 +10:00
Quantum
e74f58afb4 [idd] helper: allow no GPU warning to be configured 2026-06-03 03:02:07 -04:00
Quantum
29d02ddbb9 [idd] helper: add checkbox widget 2026-06-03 03:01:47 -04:00
Quantum
fec805fbe2 [idd] helper: show notification when no GPU is detected 2026-06-03 03:01:47 -04:00
Quantum
ebeb9d028e [idd] helper/registry: load and store no GPU preference 2026-06-03 03:01:47 -04:00
Quantum
1a137f3c08 [idd] helper: detect if system has GPU 2026-06-03 03:01:47 -04:00
Quantum
3ef8344e9f [idd] helper: set config window minimum size
This improves aesthetics and prevents widgets from getting clipped when
the window is too small.
2026-06-03 17:00:31 +10:00
Quantum
976be95177 [idd] driver: add BOM to CEdid.* for non-English systems
It wouldn't compile otherwise.
2026-06-03 16:59:58 +10:00
Geoffrey McRae
1b7c00dc82 [idd] driver: implement postprocess filters
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-06-03 08:59:48 +10:00
Geoffrey McRae
a59040f0be [idd] driver: add/expose CSettings read string/bool methods 2026-06-03 08:59:48 +10:00
Geoffrey McRae
929428c273 [idd] driver: implement dirty rect tracking 2026-06-03 08:59:48 +10:00
Geoffrey McRae
bd88a64a98 [idd] driver: cleanup magic numbers in CEdid 2026-06-03 08:59:48 +10:00
Geoffrey McRae
882d531792 [idd] driver: use the default resolution for default modes 2026-06-03 08:59:48 +10:00
Geoffrey McRae
3211bc1d93 [idd] driver: improve resolution switching performance 2026-06-03 08:59:48 +10:00
Geoffrey McRae
a10efc9e23 [idd] hdr: use iddcx 1.10 if possible and expose HDR support 2026-06-03 08:59:48 +10:00
Geoffrey McRae
dbb80ebd66 [client]: core: add timeout on pointerQueue wait loop
If the host has had a fault this loop can become infinite,
soft-locking the application. This adds a 200ms timeout to prevent this.
2026-06-03 08:59:48 +10:00
Geoffrey McRae
65005c0dc0 [idd] all: add default refresh rate setting support 2026-06-03 08:59:48 +10:00
Geoffrey McRae
c2add993ac [idd] CEdid: add new helper class to build the EDID block 2026-06-03 08:59:48 +10:00
Geoffrey McRae
83bebf4519 [idd] CSettings: fix registry string value handling
Rename the invalid default parameter and make registry string reads
more robust.

Validate the returned value type and byte count after querying the
value data, reject malformed UTF-16 sizes, and explicitly terminate
the string based on the number of bytes actually returned.

Sanity check the parsed mode values
2026-06-03 08:59:48 +10:00
Geoffrey McRae
19f75dc045 [idd] driver: CSettings minor refactor 2026-06-03 08:59:48 +10:00
Geoffrey McRae
fc6a728bb7 [client] message: fix window resize event message handling
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-05-31 22:16:02 +10:00
Geoffrey McRae
69f44a003d [all] refresh copyright
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-05-31 15:13:57 +10:00
Geoffrey McRae
0743d49abe [all] update refresh-copyright to handle UTF BOM markers 2026-05-31 15:13:32 +10:00
Geoffrey McRae
e9b7bdfea1 Revert "[all] refresh copyright"
Corrupted IDD sources due to lack of UTF-8 with BOM support in the
script.
2026-05-31 15:10:44 +10:00
Geoffrey McRae
98602fb95e [all] refresh copyright 2026-05-31 15:03:37 +10:00
Geoffrey McRae
3c8f4eec90 [doc] spelling: chosen != choosen 2026-05-31 13:49:52 +10:00
d.vorst
8318046a29 doc: clarify terminology of 'host'
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-05-31 13:26:35 +10:00
Geoffrey McRae
01b8724cfe [client] wayland: improve fractional scaling
avoids the 24.8 quantisation without introducing floating-point
equality/rounding behaviour throughout the Wayland state.

Closes #1257
2026-05-31 13:15:42 +10:00
Nikko Renn
dba2d23eb2 [repo] update PureSpice submodule 2026-05-31 12:48:02 +10:00
Janrupf
7f31ecf5e5 [all] add Janrupf to AUTHORS
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-01-17 12:43:10 +11:00
Janrupf
b181859c1b [client] wayland: fix discrete mouse scroll speed 2026-01-17 12:43:10 +11:00
Quantum
53bfb6547f [idd] config: hook up default refresh 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
2025-11-28 11:51:28 +11:00
Quantum
06c490ca72 [idd] helper/CEditWidget: support enable/disabling edit controls 2025-11-28 11:51:28 +11:00
Quantum
c8de7b27fd [idd] helper: implement registry storage for default refresh 2025-11-28 11:51:28 +11:00
Jérôme Poulin
0983e50f4d [doc] add GNOME Wayland keyboard shortcuts troubleshooting
Document the GNOME permission system for keyboard shortcuts inhibitor
protocol. GNOME stores permissions in flatpak's database even for
non-flatpak applications, which can silently block capture mode.
2025-11-28 10:57:48 +11:00
Quantum
3efe47ffb2 [idd] helper: fallback to default mode list
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
2025-11-10 17:12:40 +11:00
Quantum
4269b5598a [idd] helper: implement keyboard navigation in config window
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
2025-11-10 14:37:25 +11:00
Quantum
af207a2fe1 [idd] helper: remove compiler warnings 2025-11-10 14:35:02 +11:00
Quantum
3ed08ba56c [idd] helper: require numeric input for modes 2025-11-10 12:01:13 +11:00
Quantum
70da98c1a1 [idd] helper: implement UI for default refresh rate
The UI is not yet hooked up to anything.
2025-11-10 11:58:52 +11:00
Quantum
ed1602fc74 [idd] helper: fix notification icon creation on explorer start 2025-11-10 11:44:47 +11:00
Quantum
f9ecddab98 [idd] helper: implement mode deletion
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
2025-11-09 03:36:19 +11:00
Quantum
fad7af7740 [idd] helper: fix crash when saving invalid values 2025-11-09 03:34:24 +11:00
Quantum
6c70e36cb1 [idd] helper: allow scrolling when mode list is long 2025-11-09 03:30:07 +11:00
Quantum
dca54a79fd [idd] helper: implement adding new modes
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
2025-11-07 00:28:20 +11:00
Quantum
113199b6dd [idd] helper: prevent saving when no mode is selected 2025-11-07 00:28:20 +11:00
Quantum
7d33b93a50 [idd] helper: save mode changes into registry and update listview 2025-11-07 00:28:20 +11:00
Quantum
bf77128053 [idd] helper: add mode save button 2025-11-07 00:28:20 +11:00
Quantum
124b4742e0 [idd] helper: add mode edit controls 2025-11-07 00:28:20 +11:00
Quantum
569619384c [idd] helper: add mode edit labels 2025-11-07 00:28:20 +11:00
Quantum
1d7cb35de8 [idd] helper: detect mode listbox selection change 2025-11-07 00:28:20 +11:00
Quantum
e082acbe44 [idd] helper: use common control v6 with styles 2025-11-07 00:28:20 +11:00
Quantum
ab6e2c89d5 [idd] helper: add basic group box around mode config 2025-11-07 00:28:20 +11:00
Quantum
7a3833782c [idd] helper: display configured modes in listbox 2025-11-07 00:28:20 +11:00
Quantum
96367e83f1 [idd] helper: add CListBox widget 2025-11-07 00:28:20 +11:00
Quantum
c99f516b29 [idd] helper/resize: move logic to .cpp and add error checking 2025-11-07 00:28:20 +11:00
Quantum
2647678b0f [idd] helper: add parser for mode settings in registry 2025-11-07 00:28:20 +11:00
Quantum
40d606890b [repos] wayland-protocols: switch to a mirror on GitHub
anongit.freedesktop.org has unfortunately been very flaky in our CI
pipelines and causing builds to fail. I am running my own mirror which
syncs from the official FreeDesktop GitLab instance to GitHub, which
should allow CI pipelines to continue working on the last available
release should the GitLab sync fail.
2025-11-07 00:22:24 +11:00
Quantum
fddcb7f2d4 [idd] helper: define WIN32_LEAN_AND_MEAN globally
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
It doesn't really help that much, but since we are defining it in
some headers, we might as well do it everywhere so it actually has
some effect in case the headers were included in a different order.
2025-09-23 02:07:18 +10:00
Quantum
48ab317fa0 [idd] helper/notify: delete icon when exiting 2025-09-23 02:03:06 +10:00
Quantum
08e54fd1b1 [idd] installer: fix ivshmem driver installation 2025-09-17 21:03:27 +10:00
Quantum
b504627145 [idd] helper/notify: correctly handle menu dismissal 2025-09-17 20:47:52 +10:00
Quantum
4585362f54 [idd] helper/config: implement window positioning, fonts, and high DPI support 2025-09-17 18:05:00 +10:00
Quantum
e123e02e15 [idd] helper/CWindow: use sane value for hbrBackground 2025-09-17 18:05:00 +10:00
Quantum
85e728b59e [idd] helper: add simple static widget implementation 2025-09-17 18:05:00 +10:00
Quantum
042450a708 [idd] helper: implement basic config class 2025-09-17 18:05:00 +10:00
Quantum
9009217366 [idd] helper: stop using MsgWaitForMultipleObjects
`MsgWaitForMultipleObjects` doesn't handle inner message loops,
which may happen during `TrackPopupMenu`, causing exits to fail.
2025-09-15 09:22:27 +10:00
Quantum
d006dbb547 [idd] helper/CWindow: add onClose and onDestroy hooks 2025-09-15 09:22:27 +10:00
Quantum
c4f3936d98 [idd] helper: split CWindow into base class and CNotifyWindow 2025-09-15 09:22:27 +10:00
Geoffrey McRae
118e300f2f [repos] wayland-protocols: swith to anongit.freedesktop.org
gitlab.freedesktop.org has become unreliable over the last year,
to prevent the ci pipeline from failing, fall back to the more stable
and trusted anongit.
2025-09-15 02:03:34 +10:00
Quantum
19989ce9fb [idd] helper: add icon context menu with log directory open 2025-09-15 01:38:13 +10:00
Quantum
e1a2fa790d [idd] debug: use better log path determination algorithm 2025-09-14 06:23:13 -04:00
Quantum
daa78bcf47 [idd] debug: full Unicode handling and log as UTF-8
This commit makes `CDebug` use Unicode internally instead of whatever
random code page is in use. It also gets rid of the horrible character
counting and replaces that with `vasprintf` and `vaswprintf` helpers
(partially inspired by Linux) which allocates a buffer.

For HRESULT logging, the error code in both hex and decimal are included.

The output is now guaranteed to be UTF-8.
2025-09-14 20:00:25 +10:00
Quantum
e2bc1856b6 [idd] install: add missing io.h include 2025-09-14 19:44:50 +10:00
Quantum
30869c1c9c [idd] debug: log to C:\ProgramData\Looking Glass (IDD) 2025-09-14 17:18:44 +10:00
Quantum
9e8cb2f919 [idd] install: allow unicode errors 2025-09-14 17:18:10 +10:00
Quantum
70e0c356fc [idd] common/debug: add UTC timestamp and raw error code to logs 2025-09-14 17:17:56 +10:00
Quantum
8c3a2d01bc [idd] helper/PipeClient: use event and async I/O to interrupt read
An event, `m_signal`, is created and signalled when either `m_running` or
`m_connected` is changed by another thread, so that the pipe thread knows
to interrupt the read.

The pipe is now opened as async to allow interruption, and the I/O
operations now use overlapped I/O.

Other changes include:
* Changing `m_pipe` to `HandleT<HANDLETraits>` since `CreateFile` returns
  `INVALID_HANDLE_VALUE` instead of `NULL` on error.
* Remove the call to `WaitNamedPipeA` because it's useless and returns
  immediately without waiting if the pipe doesn't exist.
2025-09-14 17:17:21 +10:00
Quantum
eff8555f9b [idd] helper: wait on parent process directly 2025-09-14 17:16:23 +10:00
Quantum
c873aa4c4e [idd] helper: use separate log for child process 2025-09-14 17:16:23 +10:00
Quantum
5c1d604a22 [idd] helper: correctly pump message and destroy window 2025-09-14 17:16:23 +10:00
Quantum
67e1574d20 [idd] helper: add notification icon 2025-09-14 09:49:39 +10:00
Quantum
94550e09b4 [idd] helper: use CWindow helper to avoid global state 2025-09-14 09:49:39 +10:00
Quantum
9d48e70983 [idd] helper: switch to fully Unicode to avoid encoding issues 2025-09-14 09:49:39 +10:00
Quantum
48dc7a90f9 [idd] installer: use icon embedded in LGIddHelper.exe 2025-09-14 09:49:39 +10:00
Quantum
4ff5ce02d7 [idd] helper: add icon to resource 2025-09-14 09:49:39 +10:00
Geoffrey McRae
b7e3ef6824 [client] nanosvg: disable warning for release builds 2025-09-14 01:12:16 +10:00
Geoffrey McRae
870eb8c670 [repos] lgmp: update to fix queue empty state bug 2025-09-14 00:14:37 +10:00
Geoffrey McRae
d02d46283c [obs] dmabuf: fix repeated re-creation of dmabuf texture 2025-09-14 00:14:37 +10:00
Quantum
d5ee54e23e [idd] install: use CreateWellKnownSid 2025-09-13 19:49:39 +10:00
Quantum
41d3e7a981 [idd] install: rework error handling for ensureKeyWithAce
Also avoid weird allocators like LocalAlloc in favour of malloc.
2025-09-13 19:33:53 +10:00
Quantum
e75c7cff46 [idd] install: call ensureKeyWithAce once and fail properly 2025-09-13 19:10:57 +10:00
Quantum
e81462176a [idd] installer: update help text
Also rename /driver to /ivshmem since this is a driver package.
2025-09-13 14:53:22 +10:00
Geoffrey McRae
d00f12875c [idd] installer: dont make the reg key owned by USER MODE DRIVERS
Windows 11 does not allow the key to be owned by USER MODE DRIVERS
granting the user control via the ACL should resolve this
2025-09-13 14:34:04 +10:00
Geoffrey McRae
b6ceb72855 [idd] driver: cleanup duplicated string constant 2025-09-13 14:08:33 +10:00
Geoffrey McRae
13ae3441cf [idd] driver: move the ExtraMode registry key now permissions are correct
This resolves the problem of this setting being essentially lost
between driver upgrades.
2025-09-13 14:08:33 +10:00
Geoffrey McRae
b83d70a068 [idd] installer: create the IDD registry key for the driver
The driver runs under the account `NT AUTHORITY\USER MODE DRIVERS`
and as a result requires the key to be owned by this user so that
it is able to write to it.
2025-09-13 14:08:33 +10:00
Geoffrey McRae
2d28d27e90 Revert idd reg changes due to missing nsis support 2025-09-13 11:21:48 +10:00
Geoffrey McRae
e6b3b7fa76 [idd] nsis: add missed includes 2025-09-13 11:13:21 +10:00
Geoffrey McRae
9220c85e85 [idd] nsis: fix syntax error in if statements 2025-09-13 11:09:58 +10:00
Geoffrey McRae
2c370847e7 [idd] nsis: create a registry key the driver can write to 2025-09-13 11:06:01 +10:00
Quantum
e1170f8e01 [idd] installer: fix copy pasta from host installer 2025-09-13 10:39:55 +10:00
Quantum
41d2210624 [idd] installer: add option to disable old host application 2025-09-13 10:39:39 +10:00
Quantum
037a61a1c7 [host] ci/windows: use explicit windows-2025
This allows forks for whom windows-latest doesn't point to windows-2025
to build successfully.
2025-09-13 10:39:26 +10:00
Quantum
c6eda7e3a0 [idd] ci: build installer 2025-09-13 10:39:11 +10:00
Quantum
ff8650829c [idd] install: create NSIS installer script 2025-09-13 00:32:00 +10:00
Geoffrey McRae
df6d22455e [idd] install: copy executable to staging directory 2025-09-12 22:53:14 +10:00
Quantum
52849bc1d7 [idd] all: delete ARM and ARM64 targets 2025-09-12 22:36:10 +10:00
Quantum
155540a8f7 [idd] install: create new driver installer/uninstaller 2025-09-12 18:54:33 +10:00
Quantum
6e00dedc2b [idd] helper: enable per-monitor DPI awareness 2025-09-11 18:45:43 +10:00
Quantum
3da40f046d [ci] idd: add job 2025-09-11 17:05:38 +10:00
Quantum
e816847fb1 [idd] all: use UTF-8 source code 2025-09-11 17:00:35 +10:00
Geoffrey McRae
eec9aa3ae3 [client] egl: fix uninitialized use of variables 2025-09-08 11:00:06 +10:00
Geoffrey McRae
f07dd827ae [client] egl: fix null pointer dereference crash 2025-09-08 10:57:08 +10:00
Geoffrey McRae
08064efb7f [idd] driver: fix failure to track last pointer ID
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 / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2025-09-07 20:28:55 +00:00
Geoffrey McRae
01cae959d8 [client] core: workaround windows mouse information problem
Under windows there is no cursor enabled at all until it has been moved
for the fist time by the user. If our cursor information is invalid we
assume that this has occured and induce a wiggle to force windows to
create the cursor.
2025-09-07 20:24:17 +10:00
Geoffrey McRae
da154a5591 [github] ci: install NSIS (take 6)
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 / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2025-09-07 13:56:42 +10:00
Geoffrey McRae
a85b666238 [github] ci: install NSIS (take 6) 2025-09-07 13:49:13 +10:00
Geoffrey McRae
eff1e4d7ea [github] ci: install NSIS (take 4) 2025-09-07 13:42:26 +10:00
Geoffrey McRae
4affd03c2d [github] ci: install NSIS (take 3) 2025-09-07 13:37:36 +10:00
Geoffrey McRae
a1cc58c9f2 [github] ci: install NSIS (take 2) 2025-09-07 13:35:42 +10:00
Geoffrey McRae
9a6e03114e [github] ci: install nsis for windows native builds
As of the Windows Server 2025 image github provides, nsis is no longer
included, as such we must install it ourself.
2025-09-07 13:25:53 +10:00
Geoffrey McRae
0feaa716c5 [idd] helper: implement enable/disable priv
Implements `EnablePriv` and `DisablePriv` so the helper can now
interact with the desktop. Fixes issues with setting cursor position
2025-09-07 13:07:15 +00:00
Geoffrey McRae
5f9649b4a2 [client] egl: set the dmabuf sampler state at creation
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 / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2025-09-02 13:12:03 +10:00
Geoffrey McRae
e40610ea77 [client] egl: sync on fence without force glFlush in non-dmabuf path 2025-09-02 13:09:39 +10:00
Geoffrey McRae
d5839c7efd [client] egl: improve dmabuf import hot path performance
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 / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
* Removes the vector in favour of a two element array
* Removes iteration on the vector
* Create and track a per-image fence
* bind the EGLImage to the texture at creation, avoiding re-binding
* sync on GL_SYNC_FLUSH_COMMANDS_BIT and remove glFlush
2025-08-31 13:48:08 +10:00
Geoffrey McRae
2a2250b9bd [idd] driver: added files missed in the last commit 2025-08-30 18:08:53 +00:00
Geoffrey McRae
16a283717a [idd] driver; support custom resolution and refresh rate list
Custom modes can now be configured via the registry under

HKEY_LOCAL_MACHINE\SOFTWARE\LookingGlass\IDD

Create the value "Modes" as a REG_MULTI_SZ with the value as
a list of modes, for example:

1024x768@60
1920x1080@60
1920x1080@120*

The '*' denotes the preferred mode to default to if one has not
been selected by the user.
2025-08-30 18:02:55 +00:00
Geoffrey McRae
5a4a2529af [idd] driver: remove static EDID
We do not need this as we are configuring the avialable modes directly
2025-08-30 14:13:53 +00:00
Geoffrey McRae
403bf87d6d [idd] driver: ignore failure due to normal operation
If the screen is blanked or removed through a user action
`IddCxMonitorQueryHardwareCursor` will return with a failure. This
is normal and we should not log this as an error.
2025-08-30 13:05:28 +00:00
Geoffrey McRae
e1a585ad6f [idd] driver: relocate the HW cursor thread into CSwapChainProcessor
It is invalid to call `IddCxMonitorSetupHardwareCursor` before
`IddCxSwapChainSetDevice`. This fixes this by moving the thread into
CSwapChainProcessor and starting it after `IddCxSwapChainSetDevice`
has succeeded.
2025-08-30 11:56:30 +00:00
Geoffrey McRae
7c2e0ec4e9 [repo] lgmp: update to fix packing to align with MSVC properly 2025-08-30 05:14:07 +10:00
Geoffrey McRae
33600682cf [repos] lgmp: fix msvc build (take 5) 2025-08-30 03:57:02 +10:00
Geoffrey McRae
60bda2befc [repos] lgmp: fix msvc build (take 4) 2025-08-30 03:00:25 +10:00
Geoffrey McRae
04a55e1419 [repos] lgmp: fix MSVC build (take 3) 2025-08-30 02:35:55 +10:00
Geoffrey McRae
ca98b5b1fd [repos] lgmp: fix client build under MSVC 2025-08-30 01:30:27 +10:00
Geoffrey McRae
c156044423 [repos] lgmp: update to fix MSVC build 2025-08-30 01:26:18 +10:00
Geoffrey McRae
85ceae91bf [repos] lgmp: update to latest version
The queue size for the cursor needed to be increased to a power of two
with the new design for messages queues in LGMP.
2025-08-30 01:16:26 +10:00
Geoffrey McRae
f8f05c36b8 [client] egl: remove invalid call to glTexImage2D for dmabuf
GL_TEXTURE_EXTERNAL_OES is not a valid target for glTexImage2D and there
is no need to "create" the textures as this is done during import by
eglCreateImage
2025-08-29 19:25:39 +10:00
Geoffrey McRae
05bf816b45 [ci] woodpecker: restrict the entire pipeline 2025-08-29 18:56:05 +10:00
Jonathan Rubenstein
3f35b0b0af [client] wayland: xdg handles resizable
Added missing resizable functionality to xdg_shellInit
when win:allowResize is set to true
2025-08-29 18:15:58 +10:00
Jonathan Rubenstein
f7e0b9746a [client] wayland: libdecor handles borderless
Added missing borderless functionality to libdecor_shellInit
when win:borderless is set to true
This works properly when going full screen as well
2025-08-29 18:15:58 +10:00
Jacob McNamee
b7d044de5d [client] opengl: initialize scale to 1.0
Fixes SPICE cursor rendering unconditionally at (0, 0) prior to KVMFR
frame format configuration
2025-08-29 18:15:28 +10:00
Netboy3
28b653b112 [all] Update to new issue template workflow 2025-08-29 18:14:33 +10:00
Netboy3
26848ba70a [client] pipewire: Stop loading properties from client-rt.conf
Pipewire now automatically moves non-rt clients into non-rt
threads so client-rt.conf is obsolete. Stop loading it during
context initialization for Pipewire 1.3.81 and newer.
See: 24bcacc619
2025-08-29 18:14:17 +10:00
Netboy3
482f66ab9b [doc] kvmfr: Update udev rule example
Starting with version 258, "systemd-udevd ignores OWNER=/GROUP=
settings with a non-system user/group specified in udev rules files".
Change the example udev rule to remove the explicit user assignment and
instead use the "uaccess" tag to auto-assign the logged-in user
permissions. As "uaccess" tags are processed using the 73-seat-late
udev rule, the KVMFR rule file name must precede it (i.e. should use
a lower ordinal value), so change the file name in the example to reflect that.
Credit goes to Discord user "w1kl4s" for bringing this systemd change
to our attention and assisting in testing.
2025-08-29 18:12:58 +10:00
Jonathan Rubenstein
8d9806bb0e [doc] words: Add ie and evdev 2025-08-29 17:58:35 +10:00
Jonathan Rubenstein
fa661aed64 [doc] usage: Update command-line options 2025-08-29 17:58:35 +10:00
Jonathan Rubenstein
2c648b99ad [client] config: Correct spelling in win:setGuestRes
Misspelled word "resoution" corrected to "resolution"
2025-08-29 17:58:35 +10:00
Geoffrey McRae
6a6cfadbf2 [ci] woodpecker: only build pushes to gnif/LookingGlass master 2025-08-29 17:54:30 +10:00
Geoffrey McRae
11c86273d2 [idd] driver: correct reported stride 2025-08-29 15:53:42 +10:00
Stewart Borle
60d7c84972 [client] egl: make int highp in fragment shaders
https://gitlab.freedesktop.org/mesa/mesa/-/issues/12990#note_3038479
2025-08-29 15:33:52 +10:00
Marco Rodolfi
cb304115f6 Update AUTHORS
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 / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2025-06-30 14:25:08 +10:00
Marco Rodolfi
c349f704d6 [doc] client: add documentation for disableWaitingMessage option 2025-06-30 14:25:08 +10:00
Marco Rodolfi
add45347b5 [client] app: add option to disable waiting for host message 2025-06-30 14:25:08 +10:00
Geoffrey McRae
f15d72cdfe [host] ivshmem: fix missing bounds check on device vector
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 / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2025-05-10 11:12:57 +10:00
Geoffrey McRae
54d811e098 [client] keybind: add keybind to set the guest resolution
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 / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2025-04-04 10:23:00 +11:00
Geoffrey McRae
9593301511 [client] config: add option to disable auto client resolution switching 2025-04-04 10:13:19 +11:00
Geoffrey McRae
c2a19f5e76 [client] message: free any pending messages on deinit 2025-04-04 10:13:09 +11:00
Geoffrey McRae
d8baa62c6a [client] core: check if the resolution already matches the window
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 / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2025-04-02 14:03:48 +11:00
Geoffrey McRae
81162b460e [client] message: fix compile failure 2025-04-02 13:52:45 +11:00
Geoffrey McRae
852eb6bf69 [client] core: new message event system to debounce window size events 2025-04-02 13:46:55 +11:00
Geoffrey McRae
4b11743f18 [common] ll: make ll_push report success/failure 2025-04-02 13:46:07 +11:00
Geoffrey McRae
656d01a694 [idd] driver: add additional logging to CIVSHMEM
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 / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2025-03-31 00:25:54 +11:00
Geoffrey McRae
a4406ac867 [idd] driver: fix free copy queue search method 2025-03-30 23:28:04 +00:00
Geoffrey McRae
57a2f68931 [idd] driver: reduce CopyQueue contention 2025-03-30 23:18:14 +00:00
Geoffrey McRae
f4df3f0ec7 [idd] driver: pre-calculae addresses of structs and offsets 2025-03-30 22:58:12 +00:00
Geoffrey McRae
4e951184f1 [idd] driver: fix hardcoded pitch values
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 / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2025-03-30 21:40:10 +00:00
Geoffrey McRae
be4782b062 [idd] driver: fix header 2025-03-30 19:04:04 +11:00
Geoffrey McRae
b17c66d6bb [idd] driver: fix failure to intiialize command queue pending 2025-03-30 18:59:42 +11:00
Geoffrey McRae
94fbbad21c [idd] driver: handle command queue failures gracefully 2025-03-30 18:58:03 +11:00
Geoffrey McRae
63a9365377 [idd] driver: fix failure to report completion when an error occurs 2025-03-30 18:21:34 +00:00
Geoffrey McRae
cadcfe4b39 [idd] driver: fix deadlock caused by command queue completion callback
The callback runs in a random thread, we can't call directx methods
safely from it, so move reset so it's called automatically when a free
copy list is obtained.
2025-03-30 16:52:58 +00:00
Geoffrey McRae
3b883bf9fe [idd] driver: use a timeout instead of an event wait.
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 / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Waiting on the events is dangerous as there is a race here where
we may end up stuck as the events need to be auto-reset
2025-03-30 04:28:49 +00:00
Geoffrey McRae
b58171c3e1 [idd] driver: very experimental change to syncronization
This may get reverted, at this point it's an experiment for the
testers to trial.
2025-03-30 02:47:40 +00:00
Geoffrey McRae
7afb9b93eb [idd] driver: improve display mode support and resolution switch 2025-03-29 22:42:49 +00:00
Geoffrey McRae
6396ff1e9c [repos] lgmp: update for the new wdk version 2025-03-29 22:42:49 +00:00
Geoffrey McRae
db1dda00c8 [idd] all: update to sdk 10.0.26100 and iddcx 1.10 2025-03-29 22:42:48 +00:00
Geoffrey McRae
5b07286c65 [idd] driver: report we are finished with the frame earlier
`IddCxSwapChainFinishedProcessingFrame` must be called after every
frame, but we should do it as early as possible once all commands
are queued that use the frame.
2025-03-29 22:29:47 +00:00
Geoffrey McRae
6dad0de8b8 [idd] driver: reset cursor thread events on reinit 2025-03-29 22:27:55 +00:00
Geoffrey McRae
35c975d334 [idd] driver: fix loss of mouse cursor on guest wakeup
Some checks are pending
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / module (push) Waiting to run
build / host-linux (push) Waiting to run
build / host-windows-cross (push) Waiting to run
build / host-windows-native (push) Waiting to run
build / obs (clang) (push) Waiting to run
build / obs (gcc) (push) Waiting to run
build / docs (push) Waiting to run
2025-03-29 01:16:53 +00:00
Geoffrey McRae
530e83e7bf [idd] driver: cosmetics 2025-03-29 00:56:54 +00:00
Geoffrey McRae
40a4debfda [idd] driver: fix debug messages 2025-03-29 00:56:39 +00:00
Geoffrey McRae
75f07cb28c [idd] driver: improve reInit logic on failure 2025-03-29 00:56:16 +00:00
Geoffrey McRae
f26fa17bc1 [idd] driver: make m_indirectCopy static so it persists on retry 2025-03-28 23:50:54 +00:00
Geoffrey McRae
648fca7caa [idd] driver: re-plug the monitor if the heap test failed 2025-03-28 23:47:31 +00:00
Geoffrey McRae
868504d22d [client] core: fix dynamic res switch race issue 2025-03-28 23:18:41 +11:00
Geoffrey McRae
cb423730e4 [idd] driver: implement dynamic mode switch support 2025-03-28 23:17:31 +00:00
Geoffrey McRae
86de1c9ac6 [idd] common: still print the message if FormatMsg failed 2025-03-28 21:38:36 +00:00
Geoffrey McRae
d839a45d0b [client] kvmfr: report the local window size to the VM
Some checks are pending
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / module (push) Waiting to run
build / host-linux (push) Waiting to run
build / host-windows-cross (push) Waiting to run
build / host-windows-native (push) Waiting to run
build / obs (clang) (push) Waiting to run
build / obs (gcc) (push) Waiting to run
build / docs (push) Waiting to run
2025-03-28 16:38:02 +11:00
Geoffrey McRae
9ffb800e93 [idd] driver: use the frameSize instead of the resource size
As the resource size can be larger then the actual frame data, we
need to track this seperately so that we don't waste cycles copying
data the client will never use.
2025-03-28 14:35:19 +00:00
Geoffrey McRae
91e8440c9d [idd] vs: remove dynamically generated VersionInfo.h from the repo 2025-03-28 14:13:34 +00:00
Geoffrey McRae
15eff234ec [idd] driver: make indirectCopy functional 2025-03-28 14:11:48 +00:00
Geoffrey McRae
6a4edfc6b6 [idd] helper: added new helper service
Some checks are pending
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / module (push) Waiting to run
build / host-linux (push) Waiting to run
build / host-windows-cross (push) Waiting to run
build / host-windows-native (push) Waiting to run
build / obs (clang) (push) Waiting to run
build / obs (gcc) (push) Waiting to run
build / docs (push) Waiting to run
As the IDD itself runs in a WUMDF sandbox, it doesn't have enough
access to perform interactive operations such as moving the cursor.

This helper service communicates with the IDD over a named pipe,
so that we can perform these things, as well as in the future provide
a configuration GUI.
2025-03-28 12:05:02 +00:00
Geoffrey McRae
bf59e45118 [idd] cosmetic: it's a device, not a driver!
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 / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2025-03-24 16:46:52 +00:00
Geoffrey McRae
9cc99e7db9 [idd] ci: fetch the tags so the version info is correct 2025-03-24 16:15:36 +00:00
Geoffrey McRae
af5a48deca [idd] ci: fix build take 3
Revert "[idd] ci: fix build take 2"
Issue was with the docker container account

This reverts commit b1b6da32ce.
2025-03-24 15:58:59 +00:00
Geoffrey McRae
b1b6da32ce [idd] ci: fix build take 2 2025-03-24 15:54:07 +00:00
Geoffrey McRae
17b24cc8ff [idd] ci: fix compilation 2025-03-24 15:48:26 +00:00
Geoffrey McRae
7248b666ea [idd] nuget: added missing packages.config to the repo 2025-03-24 15:40:47 +00:00
Geoffrey McRae
2084a9fee3 [idd] all: generate versioning information 2025-03-24 15:37:17 +00:00
Geoffrey McRae
a2a771f94e [idd] cosmetic: single change just to trigger the ci workflow
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 / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2025-03-23 03:43:28 +00:00
Geoffrey McRae
b526eb3da0 [idd] ci: added woodpecker CI configuration for the IDD
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 / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
As the IDD requires being built in MSVC2022 with the WDK and then
signed to create a usable driver, this must be done on the LG build
server instead of github directly. This workflow will trigger this on
each commit
2025-03-20 16:46:23 +11:00
Geoffrey McRae
7a88a49f1c [idd] handle frame re-send for when a new client connects
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 / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2025-03-16 19:37:03 +00:00
Geoffrey McRae
ce23cff12e [idd] remove deprecated locking defines 2025-03-16 19:28:07 +00:00
Geoffrey McRae
09df8c41aa [idd] debug: add debug defines and make use of them 2025-03-16 16:31:44 +00:00
Geoffrey McRae
0db9d3a27b [idd] CDebug: implement new debug print class and write to a file 2025-03-16 16:11:21 +00:00
Geoffrey McRae
4f2eb984d3 [idd] remove unconditional debug enablement for DirectX11
Some checks are pending
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / module (push) Waiting to run
build / host-linux (push) Waiting to run
build / host-windows-cross (push) Waiting to run
build / host-windows-native (push) Waiting to run
build / obs (clang) (push) Waiting to run
build / obs (gcc) (push) Waiting to run
build / docs (push) Waiting to run
2025-03-16 12:35:59 +00:00
Geoffrey McRae
8b198091ce [idd] rewrite to support DirectX12 copy 2025-03-16 12:32:52 +00:00
Geoffrey McRae
62c075cfb5 [idd] make the dirver functional again 2025-03-11 10:27:46 +00:00
Geoffrey McRae
bea198735a [repos] LGMP: update to the latest version
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 / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
2025-03-09 02:57:38 +11:00
Geoffrey McRae
a421329d9a [all] general: fix possible memory leaks with realloc usage 2025-03-09 02:56:20 +11:00
Geoffrey McRae
5382a94945 [client] evdev: implement mouse support
Some checks are pending
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / module (push) Waiting to run
build / host-linux (push) Waiting to run
build / host-windows-cross (push) Waiting to run
build / host-windows-native (push) Waiting to run
build / obs (clang) (push) Waiting to run
build / obs (gcc) (push) Waiting to run
build / docs (push) Waiting to run
2025-03-08 19:14:46 +11:00
Geoffrey McRae
4278a10fe1 [client] evdev: read up to 256 events at a time 2025-03-08 18:19:10 +11:00
Geoffrey McRae
35e6a6e81a [client] evdev: handle device removal and hot-plug 2025-03-08 13:28:31 +11:00
Geoffrey McRae
afbd844be8 [client] evdev: add new exclusive evdev while captured option
Some checks are pending
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / module (push) Waiting to run
build / host-linux (push) Waiting to run
build / host-windows-cross (push) Waiting to run
build / host-windows-native (push) Waiting to run
build / obs (clang) (push) Waiting to run
build / obs (gcc) (push) Waiting to run
build / docs (push) Waiting to run
2025-03-07 13:47:01 +11:00
Geoffrey McRae
7c285a45fb [app] core: place the local cursor inside the window on capture 2025-03-07 12:21:20 +11:00
Geoffrey McRae
968fd42d46 [all] common: set the backtrace define for the entire project 2025-03-07 11:32:24 +11:00
Geoffrey McRae
66ac453c98 [client] input: add support for evdev keyboard capture mode
Some checks are pending
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / module (push) Waiting to run
build / host-linux (push) Waiting to run
build / host-windows-cross (push) Waiting to run
build / host-windows-native (push) Waiting to run
build / obs (clang) (push) Waiting to run
build / obs (gcc) (push) Waiting to run
build / docs (push) Waiting to run
The new configuration option `input:evdev` accepts a comma separated
list of `/dev/input/` keyboard devices to use for input when in capture
mode. This makes it possible to capture only a specific keyboard instead
of all keyboards.
2025-03-07 02:36:00 +11:00
359 changed files with 11672 additions and 1561 deletions

View File

@@ -1,3 +1,9 @@
---
name: Bug report
about: Report bugs in Looking Glass (only confirmed bugs and feature requests please)
---
### Issues are for Bug Reports and Feature Requests Only! ### Issues are for Bug Reports and Feature Requests Only!
If you are looking for help or support please use one of the following methods If you are looking for help or support please use one of the following methods
@@ -64,3 +70,4 @@ https://www.youtube.com/watch?v=EqxxJK9Yo64
``` ```
PASTE FULL BACKTRACE HERE PASTE FULL BACKTRACE HERE
``` ```

9
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,9 @@
blank_issues_enabled: false
contact_links:
- name: Looking Glass on Level1Tech's Forum
url: https://forum.level1techs.com/c/software/lookingGlass/142
about: Ask for help by creating a New Topic on the Level1Tech's forum
- name: Looking Glass Discord Server
url: https://discord.gg/52SMupxkvt
about: Ask for help in the Looking Glass discord server

View File

@@ -120,11 +120,33 @@ jobs:
makensis -DIVSHMEM platform/Windows/installer.nsi makensis -DIVSHMEM platform/Windows/installer.nsi
host-windows-native: host-windows-native:
runs-on: windows-latest runs-on: windows-2025
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: recursive submodules: recursive
- name: Install NSIS
shell: powershell
run: |
winget install -e --id NSIS.NSIS --silent --accept-source-agreements --accept-package-agreements
$paths = @(
(Join-Path ${env:ProgramFiles} 'NSIS\Bin'),
(Join-Path ${env:ProgramFiles(x86)} 'NSIS\Bin')
) | Where-Object { Test-Path $_ }
if ($paths.Count -eq 0) {
Write-Error "NSIS 'Bin' folder not found after install."
exit 1
}
$paths | ForEach-Object {
Add-Content -Path $env:GITHUB_PATH -Value $_
}
Write-Host "makensis location(s): $($paths -join ', ')"
- name: Test NSIS
run: |
makensis /VERSION
- name: Configure Windows host for native MinGW-w64 - name: Configure Windows host for native MinGW-w64
run: | run: |
mkdir host\build mkdir host\build
@@ -139,6 +161,36 @@ jobs:
cd host\build cd host\build
makensis -DBUILD_32BIT platform\Windows\installer.nsi makensis -DBUILD_32BIT platform\Windows\installer.nsi
idd:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x64
- name: Install NuGet packages
run: |
cd idd
nuget restore LGIdd.sln
- name: Build IDD
run: |
cd idd
msbuild.exe LGIdd.sln /t:Build /p:Configuration=Release /p:Platform=x64
- name: Build NSIS Installer
run: |
cd idd\x64\Release\LGIdd
makensis -DBUILD_32BIT installer.nsi
- name: Build NSIS installer with IVSHMEM drivers
run: |
cd idd\x64\Release
Invoke-WebRequest https://dl.quantum2.xyz/ivshmem.tar.gz -OutFile ivshmem.tar.gz
tar -xzvf ivshmem.tar.gz
cd LGIdd
makensis -DBUILD_32BIT -DIVSHMEM installer.nsi
obs: obs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:

8
.gitignore vendored
View File

@@ -11,7 +11,11 @@ module/modules.order
__pycache__ __pycache__
*.py[co] *.py[co]
*/.vs */.vs
*.user
idd/Debug idd/Debug
idd/x64 idd/x64
idd/LGIdd/x64 idd/*/x64
idd/LGIdd/Debug idd/*/Debug
idd/*/VersionInfo.h
idd/*/VERSION
idd/packages

2
.gitmodules vendored
View File

@@ -9,7 +9,7 @@
url = https://github.com/cimgui/cimgui.git url = https://github.com/cimgui/cimgui.git
[submodule "repos/wayland-protocols"] [submodule "repos/wayland-protocols"]
path = repos/wayland-protocols path = repos/wayland-protocols
url = https://gitlab.freedesktop.org/wayland/wayland-protocols.git url = https://github.com/quantum5/wayland-protocols.git
[submodule "repos/nanosvg"] [submodule "repos/nanosvg"]
path = repos/nanosvg path = repos/nanosvg
url = https://github.com/memononen/nanosvg.git url = https://github.com/memononen/nanosvg.git

34
.woodpecker/idd.yaml Normal file
View File

@@ -0,0 +1,34 @@
---
labels:
platform: windows/amd64
matrix:
BUILD_TYPE:
- Debug
- Release
when:
- event: push
branch: master
repo: gnif/LookingGlass
clone:
- name: clone
image: woodpeckerci/plugin-git
pull: false
settings:
tags: true
steps:
- name: idd
image: lg-vs2022:latest
pull: true
environment:
VS_PATH: "\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2022\\\\\""
entrypoint:
- cmd
- /C
- >
%VS_PATH%\BuildTools\Common7\Tools\VsDevCmd.bat -arch=amd64 &&
msbuild /restore idd\LGIdd.sln /p:Configuration=${BUILD_TYPE} /p:RestorePackagesConfig=true /p:Platform=x64 /p:SignMode=Off /m &&
IF EXIST C:\artifacts\build.cmd (cmd /C C:\artifacts\build.cmd)

View File

@@ -72,3 +72,6 @@ Jacob McNamee <jacob@jacobmcnamee.com> (jacobmcnamee)
Marco Antonio J. Costa <marco.antonio.costa@gmail.com> (majcosta) Marco Antonio J. Costa <marco.antonio.costa@gmail.com> (majcosta)
rs189 <35667100+rs189@users.noreply.github.com> (rs189) rs189 <35667100+rs189@users.noreply.github.com> (rs189)
Jérôme Poulin <jeromepoulin@gmail.com> (ticpu) Jérôme Poulin <jeromepoulin@gmail.com> (ticpu)
Marco Rodolfi <marco.rodolfi@tuta.io> (RodoMa92)
Stewart Borle <stewi1014@gmail.com> (stewi1014)
Jannis Lübke <business.janrupf@gmail.com> (Janrupf)

View File

@@ -113,6 +113,7 @@ set(SOURCES
src/main.c src/main.c
src/core.c src/core.c
src/app.c src/app.c
src/message.c
src/audio.c src/audio.c
src/config.c src/config.c
src/keybind.c src/keybind.c
@@ -124,6 +125,7 @@ set(SOURCES
src/eglutil.c src/eglutil.c
src/overlay_utils.c src/overlay_utils.c
src/render_queue.c src/render_queue.c
src/evdev.c
src/overlay/splash.c src/overlay/splash.c
src/overlay/alert.c src/overlay/alert.c

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
@@ -168,6 +168,12 @@ static bool pipewire_init(void)
pw_init(NULL, NULL); pw_init(NULL, NULL);
pw.loop = pw_loop_new(NULL); pw.loop = pw_loop_new(NULL);
#if PW_CHECK_VERSION(1, 3, 81)
pw.context = pw_context_new(
pw.loop,
NULL,
0);
#else
pw.context = pw_context_new( pw.context = pw_context_new(
pw.loop, pw.loop,
pw_properties_new( pw_properties_new(
@@ -176,6 +182,7 @@ static bool pipewire_init(void)
NULL NULL
), ),
0); 0);
#endif
if (!pw.context) if (!pw.context)
{ {
DEBUG_ERROR("Failed to create a context"); DEBUG_ERROR("Failed to create a context");

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
@@ -183,7 +183,7 @@ void waylandCursorFree(void)
void waylandCursorScaleChange(void) void waylandCursorScaleChange(void)
{ {
int newScale = ceil(wl_fixed_to_double(wlWm.scale)); int newScale = waylandScaleCeil(wlWm.scale);
if (newScale == wlWm.cursorScale) if (newScale == wlWm.cursorScale)
return; return;

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
@@ -46,6 +46,7 @@ typedef struct LibDecorState
int32_t width, height; int32_t width, height;
bool needsResize; bool needsResize;
bool fullscreen; bool fullscreen;
bool borderless;
uint32_t resizeSerial; uint32_t resizeSerial;
} }
LibDecorState; LibDecorState;
@@ -147,6 +148,10 @@ static bool libdecor_shellInit(
if (maximize) if (maximize)
libdecor_frame_set_maximized(state.libdecorFrame); libdecor_frame_set_maximized(state.libdecorFrame);
if (borderless)
libdecor_frame_set_visibility(state.libdecorFrame, false);
state.borderless = borderless;
if (resizable) if (resizable)
libdecor_frame_set_capabilities(state.libdecorFrame, libdecor_frame_set_capabilities(state.libdecorFrame,
LIBDECOR_ACTION_RESIZE); LIBDECOR_ACTION_RESIZE);
@@ -183,7 +188,8 @@ static void libdecor_setFullscreen(bool fs)
else else
libdecor_frame_unset_fullscreen(state.libdecorFrame); libdecor_frame_unset_fullscreen(state.libdecorFrame);
libdecor_frame_set_visibility(state.libdecorFrame, !fs); if (!state.borderless)
libdecor_frame_set_visibility(state.libdecorFrame, !fs);
} }
static bool libdecor_getFullscreen(void) static bool libdecor_getFullscreen(void)

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
@@ -49,6 +49,7 @@ typedef struct XDGState
uint32_t resizeSerial; uint32_t resizeSerial;
bool fullscreen; bool fullscreen;
bool floating; bool floating;
bool resizable;
int displayFd; int displayFd;
} }
XDGState; XDGState;
@@ -155,6 +156,13 @@ bool xdg_shellInit(struct wl_display * display, struct wl_surface * surface,
if (maximize) if (maximize)
xdg_toplevel_set_maximized(state.toplevel); xdg_toplevel_set_maximized(state.toplevel);
if (!resizable)
{
xdg_toplevel_set_min_size(state.toplevel, state.width, state.height);
xdg_toplevel_set_max_size(state.toplevel, state.width, state.height);
}
state.resizable = resizable;
if (state.decorationManager) if (state.decorationManager)
{ {
state.toplevelDecoration = zxdg_decoration_manager_v1_get_toplevel_decoration( state.toplevelDecoration = zxdg_decoration_manager_v1_get_toplevel_decoration(
@@ -200,7 +208,7 @@ static void xdg_minimize(void)
static void xdg_shellResize(int w, int h) static void xdg_shellResize(int w, int h)
{ {
if (!state.floating) if (!state.floating || !state.resizable)
return; return;
state.width = w; state.width = w;

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
@@ -92,8 +92,8 @@ void waylandEGLSwapBuffers(EGLDisplay display, EGLSurface surface, const struct
int width, height; int width, height;
wlWm.desktop->getSize(&width, &height); wlWm.desktop->getSize(&width, &height);
wl_egl_window_resize(wlWm.eglWindow, wl_fixed_to_int(width * wlWm.scale), wl_egl_window_resize(wlWm.eglWindow, waylandScaleMulInt(wlWm.scale, width),
wl_fixed_to_int(height * wlWm.scale), 0, 0); waylandScaleMulInt(wlWm.scale, height), 0, 0);
if (width == 0 || height == 0) if (width == 0 || height == 0)
skipResize = true; skipResize = true;
@@ -123,7 +123,7 @@ void waylandEGLSwapBuffers(EGLDisplay display, EGLSurface surface, const struct
wp_viewport_destroy(wlWm.viewport); wp_viewport_destroy(wlWm.viewport);
wlWm.viewport = NULL; wlWm.viewport = NULL;
} }
wl_surface_set_buffer_scale(wlWm.surface, wl_fixed_to_int(wlWm.scale)); wl_surface_set_buffer_scale(wlWm.surface, waylandScaleFloor(wlWm.scale));
} }
struct wl_region * region = wl_compositor_create_region(wlWm.compositor); struct wl_region * region = wl_compositor_create_region(wlWm.compositor);
@@ -131,7 +131,7 @@ void waylandEGLSwapBuffers(EGLDisplay display, EGLSurface surface, const struct
wl_surface_set_opaque_region(wlWm.surface, region); wl_surface_set_opaque_region(wlWm.surface, region);
wl_region_destroy(region); wl_region_destroy(region);
app_handleResizeEvent(width, height, wl_fixed_to_double(wlWm.scale), app_handleResizeEvent(width, height, waylandScaleToDouble(wlWm.scale),
(struct Border) {0, 0, 0, 0}); (struct Border) {0, 0, 0, 0});
app_invalidateWindow(true); app_invalidateWindow(true);
waylandStopWaitFrame(); waylandStopWaitFrame();

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
@@ -32,6 +32,9 @@
#include "app.h" #include "app.h"
#include "common/debug.h" #include "common/debug.h"
const double WL_SCROLL_STEP = 15.0;
const double WL_HALF_SCROLL_STEP = WL_SCROLL_STEP / 2.0;
// Mouse-handling listeners. // Mouse-handling listeners.
static void pointerMotionHandler(void * data, struct wl_pointer * pointer, static void pointerMotionHandler(void * data, struct wl_pointer * pointer,
@@ -91,12 +94,25 @@ static void pointerAxisHandler(void * data, struct wl_pointer * pointer,
if (axis != WL_POINTER_AXIS_VERTICAL_SCROLL) if (axis != WL_POINTER_AXIS_VERTICAL_SCROLL)
return; return;
int button = value > 0 ? double delta = wl_fixed_to_double(value);
5 /* SPICE_MOUSE_BUTTON_DOWN */ :
4 /* SPICE_MOUSE_BUTTON_UP */; wlWm.scrollState += delta;
app_handleButtonPress(button);
app_handleButtonRelease(button); while (wlWm.scrollState > WL_HALF_SCROLL_STEP)
app_handleWheelMotion(wl_fixed_to_double(value) / 15.0); {
app_handleButtonPress(5 /* SPICE_MOUSE_BUTTON_DOWN */);
app_handleButtonRelease(5 /* SPICE_MOUSE_BUTTON_DOWN */);
wlWm.scrollState -= WL_SCROLL_STEP;
}
while (wlWm.scrollState < -WL_HALF_SCROLL_STEP)
{
app_handleButtonPress(4 /* SPICE_MOUSE_BUTTON_UP */);
app_handleButtonRelease(4 /* SPICE_MOUSE_BUTTON_UP */);
wlWm.scrollState += WL_SCROLL_STEP;
}
app_handleWheelMotion(delta / WL_SCROLL_STEP);
} }
static int mapWaylandToSpiceButton(uint32_t button) static int mapWaylandToSpiceButton(uint32_t button)
@@ -209,7 +225,7 @@ done:
close(fd); close(fd);
} }
static int getCharcode(uint32_t key) int waylandGetCharCode(int key)
{ {
key += 8; // xkb scancode is evdev scancode + 8 key += 8; // xkb scancode is evdev scancode + 8
xkb_keysym_t sym = xkb_state_key_get_one_sym(wlWm.xkbState, key); xkb_keysym_t sym = xkb_state_key_get_one_sym(wlWm.xkbState, key);
@@ -232,7 +248,7 @@ static void keyboardEnterHandler(void * data, struct wl_keyboard * keyboard,
uint32_t * key; uint32_t * key;
wl_array_for_each(key, keys) wl_array_for_each(key, keys)
app_handleKeyPress(*key, getCharcode(*key)); app_handleKeyPress(*key);
} }
static void keyboardLeaveHandler(void * data, struct wl_keyboard * keyboard, static void keyboardLeaveHandler(void * data, struct wl_keyboard * keyboard,
@@ -253,9 +269,9 @@ static void keyboardKeyHandler(void * data, struct wl_keyboard * keyboard,
return; return;
if (state == WL_KEYBOARD_KEY_STATE_PRESSED) if (state == WL_KEYBOARD_KEY_STATE_PRESSED)
app_handleKeyPress(key, getCharcode(key)); app_handleKeyPress(key);
else else
app_handleKeyRelease(key, getCharcode(key)); app_handleKeyRelease(key);
if (!wlWm.xkbState || !app_isOverlayMode() || state != WL_KEYBOARD_KEY_STATE_PRESSED) if (!wlWm.xkbState || !app_isOverlayMode() || state != WL_KEYBOARD_KEY_STATE_PRESSED)
return; return;

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
@@ -29,17 +29,17 @@
static void outputUpdateScale(struct WaylandOutput * node) static void outputUpdateScale(struct WaylandOutput * node)
{ {
wl_fixed_t original = node->scale; struct WaylandScale original = node->scale;
if (!wlWm.useFractionalScale || !wlWm.viewporter || !node->logicalWidth) if (!wlWm.useFractionalScale || !wlWm.viewporter || !node->logicalWidth)
node->scale = wl_fixed_from_int(node->scaleInt); node->scale = waylandScaleFromInt(node->scaleInt);
else else
{ {
int32_t modeWidth = node->modeRotate ? node->modeHeight : node->modeWidth; int32_t modeWidth = node->modeRotate ? node->modeHeight : node->modeWidth;
node->scale = wl_fixed_from_double(1.0 * modeWidth / node->logicalWidth); node->scale = waylandScaleFromRatio(modeWidth, node->logicalWidth);
} }
if (original != node->scale) if (!waylandScaleEqual(original, node->scale))
waylandWindowUpdateScale(); waylandWindowUpdateScale();
} }
@@ -167,7 +167,7 @@ void waylandOutputBind(uint32_t name, uint32_t version)
} }
node->name = name; node->name = name;
node->scale = 0; node->scale = waylandScaleFromInt(0);
node->version = version; node->version = version;
node->output = wl_registry_bind(wlWm.registry, name, node->output = wl_registry_bind(wlWm.registry, name,
&wl_output_interface, version >= 3 ? 3 : 2); &wl_output_interface, version >= 3 ? 3 : 2);
@@ -209,12 +209,12 @@ void waylandOutputTryUnbind(uint32_t name)
} }
} }
wl_fixed_t waylandOutputGetScale(struct wl_output * output) struct WaylandScale waylandOutputGetScale(struct wl_output * output)
{ {
struct WaylandOutput * node; struct WaylandOutput * node;
wl_list_for_each(node, &wlWm.outputs, link) wl_list_for_each(node, &wlWm.outputs, link)
if (node->output == output) if (node->output == output)
return node->scale; return node->scale;
return 0; return waylandScaleFromInt(0);
} }

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -0,0 +1,80 @@
/**
* Looking Glass
* Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc., 59
* Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdint.h>
struct WaylandScale
{
int32_t num;
int32_t den;
};
static inline struct WaylandScale waylandScaleFromInt(int32_t scale)
{
return (struct WaylandScale) { scale, 1 };
}
static inline struct WaylandScale waylandScaleFromRatio(int32_t num, int32_t den)
{
return (struct WaylandScale) { num, den };
}
static inline bool waylandScaleValid(struct WaylandScale scale)
{
return scale.num > 0 && scale.den > 0;
}
static inline bool waylandScaleEqual(struct WaylandScale a, struct WaylandScale b)
{
return (int64_t)a.num * b.den == (int64_t)b.num * a.den;
}
static inline int waylandScaleCmp(struct WaylandScale a, struct WaylandScale b)
{
int64_t lhs = (int64_t)a.num * b.den;
int64_t rhs = (int64_t)b.num * a.den;
return (lhs > rhs) - (lhs < rhs);
}
static inline bool waylandScaleIsFractional(struct WaylandScale scale)
{
return waylandScaleValid(scale) && scale.num % scale.den != 0;
}
static inline int waylandScaleFloor(struct WaylandScale scale)
{
return scale.num / scale.den;
}
static inline int waylandScaleCeil(struct WaylandScale scale)
{
return (scale.num + scale.den - 1) / scale.den;
}
static inline int waylandScaleMulInt(struct WaylandScale scale, int value)
{
return (int)(((int64_t)value * scale.num) / scale.den);
}
static inline double waylandScaleToDouble(struct WaylandScale scale)
{
return (double)scale.num / (double)scale.den;
}

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
@@ -263,6 +263,7 @@ struct LG_DisplayServerOps LGDS_Wayland =
.uncapturePointer = waylandUncapturePointer, .uncapturePointer = waylandUncapturePointer,
.grabKeyboard = waylandGrabKeyboard, .grabKeyboard = waylandGrabKeyboard,
.ungrabKeyboard = waylandUngrabKeyboard, .ungrabKeyboard = waylandUngrabKeyboard,
.getCharCode = waylandGetCharCode,
.warpPointer = waylandWarpPointer, .warpPointer = waylandWarpPointer,
.realignPointer = waylandRealignPointer, .realignPointer = waylandRealignPointer,
.isValidPointerPos = waylandIsValidPointerPos, .isValidPointerPos = waylandIsValidPointerPos,

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
@@ -48,6 +48,8 @@
#include "wayland-xdg-output-unstable-v1-client-protocol.h" #include "wayland-xdg-output-unstable-v1-client-protocol.h"
#include "wayland-xdg-activation-v1-client-protocol.h" #include "wayland-xdg-activation-v1-client-protocol.h"
#include "scale.h"
typedef void (*WaylandPollCallback)(uint32_t events, void * opaque); typedef void (*WaylandPollCallback)(uint32_t events, void * opaque);
struct WaylandPoll struct WaylandPoll
@@ -62,7 +64,7 @@ struct WaylandPoll
struct WaylandOutput struct WaylandOutput
{ {
uint32_t name; uint32_t name;
wl_fixed_t scale; struct WaylandScale scale;
int32_t scaleInt; int32_t scaleInt;
int32_t logicalWidth; int32_t logicalWidth;
int32_t logicalHeight; int32_t logicalHeight;
@@ -108,12 +110,13 @@ struct WaylandDSState
struct wl_shm * shm; struct wl_shm * shm;
struct wl_compositor * compositor; struct wl_compositor * compositor;
wl_fixed_t scale; struct WaylandScale scale;
bool fractionalScale; bool fractionalScale;
bool needsResize; bool needsResize;
bool configured; bool configured;
bool warpSupport; bool warpSupport;
double cursorX, cursorY; double cursorX, cursorY;
double scrollState;
#if defined(ENABLE_EGL) || defined(ENABLE_OPENGL) #if defined(ENABLE_EGL) || defined(ENABLE_OPENGL)
struct wl_egl_window * eglWindow; struct wl_egl_window * eglWindow;
@@ -277,13 +280,14 @@ void waylandUncapturePointer(void);
void waylandRealignPointer(void); void waylandRealignPointer(void);
void waylandWarpPointer(int x, int y, bool exiting); void waylandWarpPointer(int x, int y, bool exiting);
void waylandGuestPointerUpdated(double x, double y, double localX, double localY); void waylandGuestPointerUpdated(double x, double y, double localX, double localY);
int waylandGetCharCode(int key);
// output module // output module
bool waylandOutputInit(void); bool waylandOutputInit(void);
void waylandOutputFree(void); void waylandOutputFree(void);
void waylandOutputBind(uint32_t name, uint32_t version); void waylandOutputBind(uint32_t name, uint32_t version);
void waylandOutputTryUnbind(uint32_t name); void waylandOutputTryUnbind(uint32_t name);
wl_fixed_t waylandOutputGetScale(struct wl_output * output); struct WaylandScale waylandOutputGetScale(struct wl_output * output);
// poll module // poll module
bool waylandPollInit(void); bool waylandPollInit(void);

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
@@ -33,20 +33,20 @@
void waylandWindowUpdateScale(void) void waylandWindowUpdateScale(void)
{ {
wl_fixed_t maxScale = 0; struct WaylandScale maxScale = waylandScaleFromInt(0);
struct SurfaceOutput * node; struct SurfaceOutput * node;
wl_list_for_each(node, &wlWm.surfaceOutputs, link) wl_list_for_each(node, &wlWm.surfaceOutputs, link)
{ {
wl_fixed_t scale = waylandOutputGetScale(node->output); struct WaylandScale scale = waylandOutputGetScale(node->output);
if (scale > maxScale) if (waylandScaleCmp(scale, maxScale) > 0)
maxScale = scale; maxScale = scale;
} }
if (maxScale) if (waylandScaleValid(maxScale))
{ {
wlWm.scale = maxScale; wlWm.scale = maxScale;
wlWm.fractionalScale = wl_fixed_from_int(wl_fixed_to_int(maxScale)) != maxScale; wlWm.fractionalScale = waylandScaleIsFractional(maxScale);
wlWm.needsResize = true; wlWm.needsResize = true;
waylandCursorScaleChange(); waylandCursorScaleChange();
app_invalidateWindow(true); app_invalidateWindow(true);
@@ -87,7 +87,7 @@ static const struct wl_surface_listener wlSurfaceListener = {
bool waylandWindowInit(const char * title, const char * appId, bool fullscreen, bool maximize, bool borderless, bool resizable) bool waylandWindowInit(const char * title, const char * appId, bool fullscreen, bool maximize, bool borderless, bool resizable)
{ {
wlWm.scale = wl_fixed_from_int(1); wlWm.scale = waylandScaleFromInt(1);
wlWm.frameEvent = lgCreateEvent(true, 0); wlWm.frameEvent = lgCreateEvent(true, 0);
if (!wlWm.frameEvent) if (!wlWm.frameEvent)

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
@@ -1087,8 +1087,9 @@ static void setFocus(bool focused, double x, double y)
app_handleFocusEvent(focused); app_handleFocusEvent(focused);
} }
static int getCharcode(int detail) static int x11GetCharCode(int detail)
{ {
detail += x11.minKeycode;
if (detail < x11.minKeycode || detail > x11.maxKeycode) if (detail < x11.minKeycode || detail > x11.maxKeycode)
return 0; return 0;
@@ -1229,8 +1230,7 @@ static void x11XInputEvent(XGenericEventCookie *cookie)
return; return;
XIDeviceEvent *device = cookie->data; XIDeviceEvent *device = cookie->data;
app_handleKeyPress(device->detail - x11.minKeycode, app_handleKeyPress(device->detail - x11.minKeycode);
getCharcode(device->detail));
if (!x11.xic || !app_isOverlayMode()) if (!x11.xic || !app_isOverlayMode())
return; return;
@@ -1280,8 +1280,7 @@ static void x11XInputEvent(XGenericEventCookie *cookie)
return; return;
XIDeviceEvent *device = cookie->data; XIDeviceEvent *device = cookie->data;
app_handleKeyRelease(device->detail - x11.minKeycode, app_handleKeyRelease(device->detail - x11.minKeycode);
getCharcode(device->detail));
if (!x11.xic || !app_isOverlayMode()) if (!x11.xic || !app_isOverlayMode())
return; return;
@@ -1310,8 +1309,7 @@ static void x11XInputEvent(XGenericEventCookie *cookie)
return; return;
XIRawEvent *raw = cookie->data; XIRawEvent *raw = cookie->data;
app_handleKeyPress(raw->detail - x11.minKeycode, app_handleKeyPress(raw->detail - x11.minKeycode);
getCharcode(raw->detail));
return; return;
} }
@@ -1321,8 +1319,7 @@ static void x11XInputEvent(XGenericEventCookie *cookie)
return; return;
XIRawEvent *raw = cookie->data; XIRawEvent *raw = cookie->data;
app_handleKeyRelease(raw->detail - x11.minKeycode, app_handleKeyRelease(raw->detail - x11.minKeycode);
getCharcode(raw->detail));
return; return;
} }
@@ -2017,6 +2014,7 @@ struct LG_DisplayServerOps LGDS_X11 =
.ungrabPointer = x11UngrabPointer, .ungrabPointer = x11UngrabPointer,
.capturePointer = x11CapturePointer, .capturePointer = x11CapturePointer,
.uncapturePointer = x11UncapturePointer, .uncapturePointer = x11UncapturePointer,
.getCharCode = x11GetCharCode,
.grabKeyboard = x11GrabKeyboard, .grabKeyboard = x11GrabKeyboard,
.ungrabKeyboard = x11UngrabKeyboard, .ungrabKeyboard = x11UngrabKeyboard,
.warpPointer = x11WarpPointer, .warpPointer = x11WarpPointer,

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
@@ -59,8 +59,8 @@ void app_handleButtonPress(int button);
void app_handleButtonRelease(int button); void app_handleButtonRelease(int button);
void app_handleWheelMotion(double motion); void app_handleWheelMotion(double motion);
void app_handleKeyboardTyped(const char * typed); void app_handleKeyboardTyped(const char * typed);
void app_handleKeyPress(int scancode, int charcode); void app_handleKeyPress(int scancode);
void app_handleKeyRelease(int scancode, int charcode); void app_handleKeyRelease(int scancode);
void app_handleKeyboardModifiers(bool ctrl, bool shift, bool alt, bool super); void app_handleKeyboardModifiers(bool ctrl, bool shift, bool alt, bool super);
void app_handleKeyboardLEDs(bool numLock, bool capsLock, bool scrollLock); void app_handleKeyboardLEDs(bool numLock, bool capsLock, bool scrollLock);
void app_handleEnterEvent(bool entered); void app_handleEnterEvent(bool entered);

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

51
client/include/evdev.h Normal file
View File

@@ -0,0 +1,51 @@
/**
* Looking Glass
* Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc., 59
* Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdbool.h>
/**
* initialize configuration options
*/
void evdev_earlyInit(void);
/**
* start the evdev layer
*/
bool evdev_start(void);
/**
* stop the evdev layer
*/
void evdev_stop(void);
/**
* grab the keyboard for exclusive access
*/
void evdev_grabKeyboard(void);
/**
* ungrab the keyboard
*/
void evdev_ungrabKeyboard(void);
/**
* returns true if input should only be processed by evdev
*/
bool evdev_isExclusive(void);

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
@@ -183,6 +183,9 @@ struct LG_DisplayServerOps
void (*capturePointer)(void); void (*capturePointer)(void);
void (*uncapturePointer)(void); void (*uncapturePointer)(void);
/* get the character code for the provided scancode */
int (*getCharCode)(int sc);
/* exiting = true if the warp is to leave the window */ /* exiting = true if the warp is to leave the window */
void (*warpPointer)(int x, int y, bool exiting); void (*warpPointer)(int x, int y, bool exiting);
@@ -253,6 +256,7 @@ struct LG_DisplayServerOps
DEBUG_ASSERT((x)->ungrabPointer ); \ DEBUG_ASSERT((x)->ungrabPointer ); \
DEBUG_ASSERT((x)->capturePointer ); \ DEBUG_ASSERT((x)->capturePointer ); \
DEBUG_ASSERT((x)->uncapturePointer ); \ DEBUG_ASSERT((x)->uncapturePointer ); \
DEBUG_ASSERT((x)->getCharCode ); \
DEBUG_ASSERT((x)->warpPointer ); \ DEBUG_ASSERT((x)->warpPointer ); \
DEBUG_ASSERT((x)->realignPointer ); \ DEBUG_ASSERT((x)->realignPointer ); \
DEBUG_ASSERT((x)->isValidPointerPos ); \ DEBUG_ASSERT((x)->isValidPointerPos ); \

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
@@ -479,6 +479,13 @@ bool egl_desktopRender(EGL_Desktop * desktop, unsigned int outputWidth,
EGL_Texture * texture = egl_postProcessGetOutput(desktop->pp, EGL_Texture * texture = egl_postProcessGetOutput(desktop->pp,
&finalSizeX, &finalSizeY); &finalSizeX, &finalSizeY);
if (unlikely(!texture))
{
texture = tex;
finalSizeX = width;
finalSizeY = height;
}
glBindFramebuffer(GL_FRAMEBUFFER, 0); glBindFramebuffer(GL_FRAMEBUFFER, 0);
egl_resetViewport(desktop->egl); egl_resetViewport(desktop->egl);

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -2,6 +2,7 @@
#extension GL_OES_EGL_image_external_essl3 : enable #extension GL_OES_EGL_image_external_essl3 : enable
precision highp float; precision highp float;
precision highp int;
in vec2 fragCoord; in vec2 fragCoord;
out vec4 fragColor; out vec4 fragColor;

View File

@@ -1,5 +1,6 @@
#version 300 es #version 300 es
precision highp float; precision highp float;
precision highp int;
in vec2 uv; in vec2 uv;
out vec4 color; out vec4 color;

View File

@@ -1,5 +1,6 @@
#version 300 es #version 300 es
precision highp float; precision highp float;
precision highp int;
#include "color_blind.h" #include "color_blind.h"

View File

@@ -1,5 +1,6 @@
#version 300 es #version 300 es
precision highp float; precision highp float;
precision highp int;
out vec4 color; out vec4 color;

View File

@@ -2,6 +2,7 @@
#extension GL_OES_EGL_image_external_essl3 : enable #extension GL_OES_EGL_image_external_essl3 : enable
precision highp float; precision highp float;
precision highp int;
#define EGL_SCALE_AUTO 0 #define EGL_SCALE_AUTO 0
#define EGL_SCALE_NEAREST 1 #define EGL_SCALE_NEAREST 1

View File

@@ -2,6 +2,7 @@
#extension GL_OES_EGL_image_external_essl3 : enable #extension GL_OES_EGL_image_external_essl3 : enable
precision highp float; precision highp float;
precision highp int;
in vec2 fragCoord; in vec2 fragCoord;
out vec4 fragColor; out vec4 fragColor;

View File

@@ -2,6 +2,7 @@
#extension GL_OES_EGL_image_external_essl3 : enable #extension GL_OES_EGL_image_external_essl3 : enable
precision highp float; precision highp float;
precision highp int;
#define PI 3.141592653589793 #define PI 3.141592653589793

View File

@@ -2,6 +2,7 @@
#extension GL_OES_EGL_image_external_essl3 : enable #extension GL_OES_EGL_image_external_essl3 : enable
precision highp float; precision highp float;
precision highp int;
in vec2 fragCoord; in vec2 fragCoord;
out vec4 fragColor; out vec4 fragColor;

View File

@@ -2,6 +2,7 @@
#extension GL_OES_EGL_image_external_essl3 : enable #extension GL_OES_EGL_image_external_essl3 : enable
precision highp float; precision highp float;
precision highp int;
#include "compat.h" #include "compat.h"

View File

@@ -2,6 +2,7 @@
#extension GL_OES_EGL_image_external_essl3 : enable #extension GL_OES_EGL_image_external_essl3 : enable
precision highp float; precision highp float;
precision highp int;
#include "compat.h" #include "compat.h"

View File

@@ -1,5 +1,6 @@
#version 300 es #version 300 es
precision highp float; precision highp float;
precision highp int;
#include "compat.h" #include "compat.h"

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
@@ -255,7 +255,6 @@ EGL_TexStatus egl_texBufferStreamProcess(EGL_Texture * texture)
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
this->sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); this->sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
glFlush();
} }
return EGL_TEX_STATUS_OK; return EGL_TEX_STATUS_OK;
@@ -271,7 +270,8 @@ EGL_TexStatus egl_texBufferStreamGet(EGL_Texture * texture, GLuint * tex,
if (this->sync) if (this->sync)
{ {
switch(glClientWaitSync(this->sync, 0, 40000000)) // 40ms switch(glClientWaitSync(
this->sync, GL_SYNC_FLUSH_COMMANDS_BIT, 40000000)) //40ms
{ {
case GL_ALREADY_SIGNALED: case GL_ALREADY_SIGNALED:
case GL_CONDITION_SATISFIED: case GL_CONDITION_SATISFIED:

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
@@ -22,7 +22,7 @@
#include "texture_buffer.h" #include "texture_buffer.h"
#include "util.h" #include "util.h"
#include "common/vector.h" #include "common/array.h"
#include "egl_dynprocs.h" #include "egl_dynprocs.h"
#include "egldebug.h" #include "egldebug.h"
@@ -30,6 +30,8 @@ struct FdImage
{ {
int fd; int fd;
EGLImage image; EGLImage image;
GLsync sync;
int texIndex;
}; };
typedef struct TexDMABUF typedef struct TexDMABUF
@@ -37,7 +39,9 @@ typedef struct TexDMABUF
TextureBuffer base; TextureBuffer base;
EGLDisplay display; EGLDisplay display;
Vector images;
struct FdImage images[2];
int lastIndex;
EGL_PixelFormat pixFmt; EGL_PixelFormat pixFmt;
unsigned fourcc; unsigned fourcc;
@@ -59,21 +63,26 @@ static void egl_texDMABUFCleanup(EGL_Texture * texture)
TextureBuffer * parent = UPCAST(TextureBuffer, texture); TextureBuffer * parent = UPCAST(TextureBuffer, texture);
TexDMABUF * this = UPCAST(TexDMABUF , parent); TexDMABUF * this = UPCAST(TexDMABUF , parent);
struct FdImage * image; for(int i = 0; i < ARRAY_LENGTH(this->images); ++i)
vector_forEachRef(image, &this->images) {
g_egl_dynProcs.eglDestroyImage(this->display, image->image); if (this->images[i].image != EGL_NO_IMAGE)
vector_clear(&this->images); {
g_egl_dynProcs.eglDestroyImage(this->display, this->images[i].image);
this->images[i].image = EGL_NO_IMAGE;
}
if (this->images[i].sync)
{
glDeleteSync(this->images[i].sync);
this->images[i].sync = 0;
}
this->images[i].fd = -1;
this->images[i].texIndex = -1;
}
egl_texUtilFreeBuffers(parent->buf, parent->texCount); egl_texUtilFreeBuffers(parent->buf, parent->texCount);
if (parent->tex[0]) if (parent->tex[0])
glDeleteTextures(parent->texCount, parent->tex); glDeleteTextures(parent->texCount, parent->tex);
if (parent->sync)
{
glDeleteSync(parent->sync);
parent->sync = 0;
}
} }
// dmabuf functions // dmabuf functions
@@ -84,17 +93,18 @@ static bool egl_texDMABUFInit(EGL_Texture ** texture, EGL_TexType type,
TexDMABUF * this = calloc(1, sizeof(*this)); TexDMABUF * this = calloc(1, sizeof(*this));
*texture = &this->base.base; *texture = &this->base.base;
if (!vector_create(&this->images, sizeof(struct FdImage), 2)) for(int i = 0; i < ARRAY_LENGTH(this->images); ++i)
{ {
free(this); this->images[i].fd = -1;
*texture = NULL; this->images[i].image = EGL_NO_IMAGE;
return false; this->images[i].sync = 0;
this->images[i].texIndex = -1;
} }
this->lastIndex = -1;
EGL_Texture * parent = &this->base.base; EGL_Texture * parent = &this->base.base;
if (!egl_texBufferStreamInit(&parent, type, display)) if (!egl_texBufferStreamInit(&parent, type, display))
{ {
vector_destroy(&this->images);
free(this); free(this);
*texture = NULL; *texture = NULL;
return false; return false;
@@ -119,8 +129,6 @@ static void egl_texDMABUFFree(EGL_Texture * texture)
TexDMABUF * this = UPCAST(TexDMABUF , parent); TexDMABUF * this = UPCAST(TexDMABUF , parent);
egl_texDMABUFCleanup(texture); egl_texDMABUFCleanup(texture);
vector_destroy(&this->images);
egl_texBufferFree(&parent->base); egl_texBufferFree(&parent->base);
free(this); free(this);
} }
@@ -141,22 +149,8 @@ static bool texDMABUFSetup(EGL_Texture * texture)
egl_texDMABUFCleanup(texture); egl_texDMABUFCleanup(texture);
glGenTextures(parent->texCount, parent->tex); glGenTextures(parent->texCount, parent->tex);
for(int i = 0; i < parent->texCount; ++i)
{
glBindTexture(GL_TEXTURE_EXTERNAL_OES, parent->tex[i]);
glTexImage2D(GL_TEXTURE_EXTERNAL_OES,
0,
texture->format.intFormat,
this->width,
texture->format.height,
0,
this->format,
texture->format.dataType,
NULL);
}
glBindTexture(GL_TEXTURE_EXTERNAL_OES, 0);
parent->rIndex = -1; parent->rIndex = -1;
return true; return true;
} }
@@ -212,16 +206,12 @@ static bool egl_texDMABUFUpdate(EGL_Texture * texture,
DEBUG_ASSERT(update->type == EGL_TEXTYPE_DMABUF); DEBUG_ASSERT(update->type == EGL_TEXTYPE_DMABUF);
EGLImage image = EGL_NO_IMAGE; struct FdImage *fdImage =
(this->images[0].fd == update->dmaFD) ? &this->images[0] :
struct FdImage * fdImage; (this->images[1].fd == update->dmaFD) ? &this->images[1] :
vector_forEachRef(fdImage, &this->images) (this->images[0].fd == -1) ? &this->images[0] :
if (fdImage->fd == update->dmaFD) &this->images[1];
{ EGLImage image = fdImage->image;
image = fdImage->image;
break;
}
if (unlikely(image == EGL_NO_IMAGE)) if (unlikely(image == EGL_NO_IMAGE))
{ {
bool setup = false; bool setup = false;
@@ -248,28 +238,31 @@ static bool egl_texDMABUFUpdate(EGL_Texture * texture,
return false; return false;
} }
if (unlikely(!vector_push(&this->images, &(struct FdImage) { fdImage->fd = update->dmaFD;
.fd = update->dmaFD, fdImage->image = image;
.image = image,
}))) int slot = (fdImage == &this->images[0]) ? 0 : 1;
fdImage->texIndex = slot;
INTERLOCKED_SECTION(parent->copyLock,
{ {
DEBUG_ERROR("Failed to store EGLImage"); glBindTexture(GL_TEXTURE_EXTERNAL_OES, parent->tex[slot]);
g_egl_dynProcs.eglDestroyImage(this->display, image); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
return false; glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
} glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
g_egl_dynProcs.glEGLImageTargetTexture2DOES(
GL_TEXTURE_EXTERNAL_OES, image);
});
} }
this->lastIndex = (fdImage == &this->images[0]) ? 0 : 1;
INTERLOCKED_SECTION(parent->copyLock, INTERLOCKED_SECTION(parent->copyLock,
{ {
glBindTexture(GL_TEXTURE_EXTERNAL_OES, parent->tex[parent->bufIndex]); if (fdImage->sync)
g_egl_dynProcs.glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, image); glDeleteSync(fdImage->sync);
fdImage->sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
if (likely(parent->sync))
glDeleteSync(parent->sync);
parent->sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
}); });
glFlush();
return true; return true;
} }
@@ -284,23 +277,22 @@ static EGL_TexStatus egl_texDMABUFGet(EGL_Texture * texture, GLuint * tex,
TextureBuffer * parent = UPCAST(TextureBuffer, texture); TextureBuffer * parent = UPCAST(TextureBuffer, texture);
TexDMABUF * this = UPCAST(TexDMABUF , parent); TexDMABUF * this = UPCAST(TexDMABUF , parent);
if (unlikely(this->lastIndex < 0))
return EGL_TEX_STATUS_NOTREADY;
struct FdImage *cur = &this->images[this->lastIndex];
GLsync sync = 0; GLsync sync = 0;
INTERLOCKED_SECTION(parent->copyLock, INTERLOCKED_SECTION(parent->copyLock, {
{ if (cur->sync) {
if (parent->sync) sync = cur->sync;
{ cur->sync = 0;
sync = parent->sync;
parent->sync = 0;
parent->rIndex = parent->bufIndex;
if (++parent->bufIndex == parent->texCount)
parent->bufIndex = 0;
} }
}); });
if (sync) if (sync)
{ {
switch(glClientWaitSync(sync, 0, 20000000)) // 20ms switch (glClientWaitSync(sync, GL_SYNC_FLUSH_COMMANDS_BIT, 20000000)) //20ms
{ {
case GL_ALREADY_SIGNALED: case GL_ALREADY_SIGNALED:
case GL_CONDITION_SATISFIED: case GL_CONDITION_SATISFIED:
@@ -308,10 +300,11 @@ static EGL_TexStatus egl_texDMABUFGet(EGL_Texture * texture, GLuint * tex,
break; break;
case GL_TIMEOUT_EXPIRED: case GL_TIMEOUT_EXPIRED:
// Put it back for next try
INTERLOCKED_SECTION(parent->copyLock, INTERLOCKED_SECTION(parent->copyLock,
{ {
if (!parent->sync) if (!cur->sync)
parent->sync = sync; cur->sync = sync;
else else
glDeleteSync(sync); glDeleteSync(sync);
}); });
@@ -325,7 +318,7 @@ static EGL_TexStatus egl_texDMABUFGet(EGL_Texture * texture, GLuint * tex,
} }
} }
*tex = parent->tex[parent->rIndex]; *tex = parent->tex[cur->texIndex];
if (fmt) if (fmt)
*fmt = this->pixFmt; *fmt = this->pixFmt;

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

View File

@@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors * Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io * https://looking-glass.io
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it

Some files were not shown because too many files have changed in this diff Show More