Compare commits

..

126 Commits

Author SHA1 Message Date
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 b1b6da32cea7fdb8952bbea6717e677416d99671.
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
Geoffrey McRae
27fe47cbe2 [obs] dmabuf: enable dmabuf by default
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-06 14:39:51 +11:00
Geoffrey McRae
aefbebff9c [obs] cosmetics: adhere to 80 column rule 2025-03-06 14:39:31 +11:00
Geoffrey McRae
9174b1ae0f [host] d12: perform full re-initialization if the heapTest fails
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-05 16:44:29 +11:00
Geoffrey McRae
f6b7ea11c8 [host] app: fix complation on windows with mingw 2025-03-05 16:34:07 +11:00
Geoffrey McRae
2c50ce4dbd [github] build: add libfontconfig-dev dependency 2025-03-05 16:25:01 +11:00
Geoffrey McRae
f6b0752e45 [github] build: use native packages now ubuntu 24.04 is available 2025-03-05 16:22:00 +11:00
Geoffrey McRae
50fee59b29 [client] app: fix broken keyboard input after imgui update 2025-03-05 16:07:06 +11:00
Geoffrey McRae
554f5bf75d [client] overlay: use graph address as imgui id 2025-03-05 15:25:34 +11:00
Geoffrey McRae
b43f572af0 Revert "[client] overlay/status: don't return damage rect if nothing was drawn"
This reverts commit 7e9e38faa5d3144dac9e9c3abd357435b25c16ff as it
causes screen corruption when moving imgui overlay dialogs around.
2025-03-05 15:18:29 +11:00
Geoffrey McRae
d9f2df361d [client] cimgui: update to 1.91.8 2025-03-05 15:16:31 +11:00
Geoffrey McRae
6dcf178879 [github] linux-host: add missing dependency for xcb/shm 2025-03-05 13:32:33 +11:00
Geoffrey McRae
ea00b623ed [github] linux-host: add missing dependency for gio/gio-unix 2025-03-05 13:27:43 +11:00
Geoffrey McRae
711c932380 [all] common: fix compilation on clang 2025-03-05 12:48:20 +11:00
Geoffrey McRae
be52a86a9a [all] repos: update LGMP and PureSpice submodules 2025-03-05 12:44:58 +11:00
Geoffrey McRae
420eaebb71 [cmake] all: update cmake_minimum_required version to 3.10 2025-03-05 12:27:23 +11:00
Geoffrey McRae
551298ed5b [doc] all: update copyright year 2025-03-05 12:24:38 +11:00
Mark Stosberg
41008add12 [client] linux: Install .desktop file and icon
SVGs have had a great support for Linux for about a decade, so only
install that for simplicity.
2025-03-05 11:12:42 +11:00
Jonathan Rubenstein
32d1b8063e [doc] requirements: Modify language of DMABUF for iGPUS 2025-03-05 11:11:54 +11:00
Jonathan Rubenstein
b0227a8ff8 [doc] Add hypervisor and framebuffer to words.txt
Used `python ./sort_words.py -s -a framebuffer -a hypervisor`
This also properly sorted the list
2025-03-05 11:11:54 +11:00
Jonathan Rubenstein
a1c713556d [doc] install_libvirt: Link to iGPUs should use DMABUF 2025-03-05 11:11:54 +11:00
Jonathan Rubenstein
a0cf34df73 [doc] requirements: Add section encouraging DMABUF use for iGPUs 2025-03-05 11:11:54 +11:00
Jonathan Rubenstein
fbb489b9b6 [github] pr-check: Automatically add review requesting changes when PR author is not found in AUTHORS 2025-03-05 11:02:45 +11:00
Chris Spencer
03ca20d3e4 [client] overlay/msg: fix race condition in render
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
If an overlay is closed with overlayMsg_close, the message can be freed
while it is still being used by msg_render, resulting in a segfault. Lock
the message list for the duration of msg_render to fix this.
2025-03-05 10:59:05 +11:00
Chris Spencer
7e9e38faa5 [client] overlay/status: don't return damage rect if nothing was drawn
The renderer contains an optimization to skip ImGui if there is nothing to
show, but the status overlay always returns a damage rect, even if it
didn't draw anything, so the optimization can never take effect.
2025-03-05 10:58:10 +11:00
Chris Spencer
0fd6f59bbb [client] egl: fix desktop render dimensions check
Code now matches the error message.
2025-03-05 10:57:20 +11:00
Justin Gatzen
661efd107e [host] app: fix app state race in lgmpTimer thread
While resuming from hibernation lgmpTimer may transition app.state to
APP_STATE_REINIT_LGMP. Sometimes the transition is lost if the app_main
processing loop also changes app.state simultaneously. This seems to
occur frequently with the hibernation use case.

Separate lgmp timer state into its own enum. Move resulting app.state
transitions to the app_main loop so they are serialized.
2025-03-05 10:56:39 +11:00
Jérôme Poulin
f6094de919 [module] MODULE_IMPORT_NS now requires a string literal in 6.13
Fixes: #1155
References: 33def8498fdde180023444b08e12b72a9efed41d
Co-authored-by: HikariKnightt <2557889+HikariKnight@users.noreply.github.com>
Co-authored-by: zeule <zeule@users.noreply.github.com>
Reviewed-by: netboy3 <1472804+netboy3@users.noreply.github.com>
2025-03-05 10:52:31 +11:00
Geoffrey McRae
77f6054f0a d12: implement indirectCopy fallback for compatibillity
When the heapTest fails for DMA copies to shared memory, fallback to
conventional CPU copy via mapped resources. While this is less optimal,
it is still faster then the older DXGI capture backend.
2025-02-19 16:30:27 +11:00
Geoffrey McRae
c169d4ab23 [obs] dmabuf: fix failure to display frames in both buffers 2025-02-14 19:24:36 +11:00
rs189
e25492a3a3 [client] x11/wayland: add application 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
2024-10-15 11:52:10 +11:00
Geoffrey McRae
4e8201da07 [common] ivshmem: default to /dev/kvmfr0 if it's found
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
2024-09-05 14:01:28 +10:00
Geoffrey McRae
6a0a635781 [common] rect: fix avx unaligned bytes copy
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
Thanks @D0ot for debugging and finding this this, the LG community are
very appreciate for a fix for this long outstanding bug.

Fixes #1129
Closes #1136
2024-08-30 09:12:19 +10:00
Geoffrey McRae
3ea37b86e3 [module] check vmf->pgoff before using it
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 reported by @Crispy-fried-chicken in issue #1133 there is a potential
XXE vulnerability here. This fixes this problem by verifying the value
of `vmf->pgff` does not exceed the bounds of the memory mapping.

Fixes: #1133
2024-08-26 14:37:21 +10:00
Geoffrey McRae
d060e375ea [client] fix typo
Fixes #1122 - Thanks @MadelineRitchie
2024-06-07 19:04:03 +10:00
Geoffrey McRae
7305ce36af [module] fix build on linux 6.10
Fixes #1124 - Thanks @pongo1231
2024-06-07 19:02:23 +10:00
vmfortress
c04f84b85c [client] pipewire: Add pipewire application name 2024-06-07 18:59:14 +10:00
majcosta
d21bdebc52 [doc] kvmfr/libvirt: change double quotes to single quotes
virt-manager (or libvirt itself) tends to preserve outer quotation marks but explode inner double-quotes into '&quot' which is annoying.

this looks nicer when pasted into the XML editor and applied

Also used double-quotes for the QEMU <6.2 example for consistency

PS: added myself to AUTHORS since this is my first contribution
2024-06-02 12:42:13 +10:00
Jacob McNamee
695cbc2d61 [all] update authors 2024-05-20 19:42:21 +10:00
Jacob McNamee
2067b21d47 [client] egl: fix line copy size computation in texBufferStreamUpdate 2024-05-20 19:42:21 +10:00
Jacob McNamee
9bc82ab1b4 [client] egl: fix misuse of stride vs. pitch in texBufferStreamUpdate 2024-05-20 19:42:21 +10:00
Jacob McNamee
82c9df54c5 [client] egl: fix unintended vertical clipping in spiceDrawFill 2024-05-20 19:42:21 +10:00
Jacob McNamee
c48bd35b3a [client] opengl: fix unintended vertical clipping in spiceDrawFill 2024-05-20 19:42:21 +10:00
Geoffrey McRae
ecd3692e1e [host] dxgi: fix crash during init due to out of order accesses 2024-04-04 22:44:49 +11:00
Geoffrey McRae
23b773ad80 [client] wayland: fix failure to select libdecor
Fixes #1116 - Thanks @blu3bird
2024-03-27 01:57:01 +11:00
kamplom
a626a1142d [client] wayland: Let viewporter use full wl_buffer 2024-03-22 03:56:26 +11:00
Netboy3
e70718600c [doc] Update module libvirt setup 2024-03-21 13:00:05 +11:00
Geoffrey McRae
0990c59eff [obs] fix compilation for older versions of OBS 2024-03-18 17:42:40 +11:00
Geoffrey McRae
fb1d96e147 [obs] tell OBS if we are operating in HDR 2024-03-18 17:35:25 +11:00
Geoffrey McRae
7f515c54b3 [client] x11/i3: fix fullscreen at launch via parameter/config 2024-03-14 12:56:39 +11:00
Geoffrey McRae
20972cfd9b [client] cmake: move X11 config directives to displayservers 2024-03-13 11:17:25 +11:00
Geoffrey McRae
dc9065b62f [client] egl: do not use DMA when using the spice display 2024-03-12 13:57:23 +11:00
Geoffrey McRae
13b9756e80 [client] egl: fix desktop spice toggle race 2024-03-12 11:58:16 +11:00
Geoffrey McRae
d902afa3dc [host] d12: fix error output string format 2024-03-11 20:32:34 +11:00
Geoffrey McRae
6e37305765 [host] d12: check if the device was removed during init 2024-03-11 20:27:36 +11:00
Geoffrey McRae
dd6c79594b [host] d12: check for failure to obtain d3d12 functions 2024-03-11 20:16:00 +11:00
Geoffrey McRae
ce9ed5da5d [host] d12: add additional debug tracing 2024-03-11 20:12:41 +11:00
Geoffrey McRae
fdad5daff8 [host/common] d12: add debug tracing 2024-03-11 19:14:54 +11:00
Geoffrey McRae
8d25469d27 [host] d12: limit the dx11 interop level to one version 2024-03-11 18:44:26 +11:00
Geoffrey McRae
8c5d1d47ee [host] nvfbc: mark NvFBC as deprecated 2024-03-11 14:16:12 +11:00
Geoffrey McRae
90398bc04f [host] app: do not try to use deprecated interfaces automatically 2024-03-11 14:16:12 +11:00
Geoffrey McRae
989fe2bb0b [host] d12: test if creating resources in the heap works at init
AMD GPUs and older NVidia GPUs can initialize fine but fail when we
start to create resources in the shared memory heap, we must test it
early to detect this so we can fallback to a working capture method.
2024-03-11 14:16:12 +11:00
Geoffrey McRae
7a41169104 [doc] consistency fix in example output 2024-03-11 00:59:46 +11:00
Geoffrey McRae
0b4322d921 [doc] remove NvFBC tuning recommendation now D12 is faster 2024-03-09 23:06:37 +11:00
332 changed files with 5598 additions and 1203 deletions

View File

@ -2,7 +2,7 @@ name: build
on: [push, pull_request] on: [push, pull_request]
jobs: jobs:
client: client:
runs-on: ubuntu-20.04 runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -15,12 +15,6 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: recursive submodules: recursive
- name: Install libdecor PPA
run: sudo add-apt-repository ppa:christianrauch/libdecoration
if: ${{ matrix.wayland_shell == 'libdecor' }}
- name: Install PipeWire repository
run: |
echo 'deb [trusted=yes] https://pipewire-ubuntu.quantum5.workers.dev ./' | sudo tee /etc/apt/sources.list.d/pipewire.list
- name: Update apt - name: Update apt
run: | run: |
sudo apt-get update sudo apt-get update
@ -32,6 +26,7 @@ jobs:
libgl-dev libgles-dev \ libgl-dev libgles-dev \
libx11-dev libxss-dev libxi-dev libxinerama-dev libxcursor-dev libxpresent-dev \ libx11-dev libxss-dev libxi-dev libxinerama-dev libxcursor-dev libxpresent-dev \
libwayland-dev libxkbcommon-dev \ libwayland-dev libxkbcommon-dev \
libfontconfig-dev \
libsamplerate0-dev libpipewire-0.3-dev libpulse-dev \ libsamplerate0-dev libpipewire-0.3-dev libpulse-dev \
$([ '${{ matrix.wayland_shell }}' = libdecor ] && echo 'libdecor-0-dev libdbus-1-dev') \ $([ '${{ matrix.wayland_shell }}' = libdecor ] && echo 'libdecor-0-dev libdbus-1-dev') \
$([ '${{ matrix.compiler.cc }}' = clang ] && echo 'clang-tools') $([ '${{ matrix.compiler.cc }}' = clang ] && echo 'clang-tools')
@ -76,16 +71,13 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: recursive submodules: recursive
- name: Install PipeWire repository
run: |
echo 'deb [trusted=yes] https://pipewire-ubuntu.quantum5.workers.dev ./' | sudo tee /etc/apt/sources.list.d/pipewire.list
- name: Update apt - name: Update apt
run: | run: |
sudo apt-get update sudo apt-get update
- name: Install Linux host dependencies - name: Install Linux host dependencies
run: | run: |
sudo apt-get install binutils-dev libxcb-xfixes0-dev \ sudo apt-get install binutils-dev libglib2.0-dev libxcb-xfixes0-dev \
libpipewire-0.3-dev libpipewire-0.3-dev libxcb-shm0-dev
- name: Configure Linux host - name: Configure Linux host
run: | run: |
mkdir host/build mkdir host/build

View File

@ -3,16 +3,36 @@ on: pull_request
jobs: jobs:
authors: authors:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
pull-requests: write
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Check AUTHORS file - name: Check AUTHORS file
id: check-authors
run: | run: |
user="$(curl -H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -s https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }} | jq -r .user.login)" user="$(curl -H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -s https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }} | jq -r .user.login)"
echo "user=$user" >> "$GITHUB_OUTPUT"
echo "Checking if GitHub user $user is in AUTHORS file..." echo "Checking if GitHub user $user is in AUTHORS file..."
if grep -q -E '> \('"$user"'\)' AUTHORS; then if grep -q -E '> \('"$user"'\)' AUTHORS; then
echo "$user found in AUTHORS file, all good!" echo "$user found in AUTHORS file, all good!"
else else
echo "$user not found in AUTHORS file." echo "$user not found in AUTHORS file."
echo "Please add yourself to the AUTHORS file and try again." echo "Please add yourself to the AUTHORS file and try again."
exit 1 echo "not-found=yes" >> "$GITHUB_OUTPUT"
fi fi
- name: 'Not found: Create review requesting changes'
if: ${{ steps.check-authors.outputs.not-found }}
uses: actions/github-script@v7
with:
script: |
github.rest.pulls.createReview({
owner: context.issue.owner,
repo: context.issue.repo,
pull_number: context.issue.number,
event: "REQUEST_CHANGES",
body: "@${{ steps.check-authors.outputs.user }} not found in AUTHORS file.\n" +
"Please add yourself to the AUTHORS file and try again."
});
- name: 'Not found: Fail job'
if: ${{ steps.check-authors.outputs.not-found }}
run: exit 1

7
.gitignore vendored
View File

@ -11,7 +11,10 @@ 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/packages

32
.woodpecker/idd.yaml Normal file
View File

@ -0,0 +1,32 @@
---
labels:
platform: windows/amd64
matrix:
BUILD_TYPE:
- Debug
- Release
clone:
- name: clone
image: woodpeckerci/plugin-git
pull: false
settings:
tags: true
steps:
- name: idd
when:
- branch: master
event: [push, manual]
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

@ -67,3 +67,8 @@ Daniel Cordero <looking-glass@0xdc.io> (0xdc)
esi <git@esibun.net> (esibun) esi <git@esibun.net> (esibun)
MakiseKurisu <saberconer@gmail.com> (MakiseKurisu) MakiseKurisu <saberconer@gmail.com> (MakiseKurisu)
Zenithal <i@zenithal.me> (ZenithalHourlyRate) Zenithal <i@zenithal.me> (ZenithalHourlyRate)
Kamplom <6284968128@protonmail.ch> (kamplom)
Jacob McNamee <jacob@jacobmcnamee.com> (jacobmcnamee)
Marco Antonio J. Costa <marco.antonio.costa@gmail.com> (majcosta)
rs189 <35667100+rs189@users.noreply.github.com> (rs189)
Jérôme Poulin <jeromepoulin@gmail.com> (ticpu)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.10)
project(looking-glass-client C CXX) project(looking-glass-client C CXX)
get_filename_component(PROJECT_TOP "${PROJECT_SOURCE_DIR}/.." ABSOLUTE) get_filename_component(PROJECT_TOP "${PROJECT_SOURCE_DIR}/.." ABSOLUTE)
@ -42,19 +42,12 @@ add_feature_info(ENABLE_ASAN ENABLE_ASAN "AddressSanitizer support.")
option(ENABLE_UBSAN "Build with UndefinedBehaviorSanitizer" OFF) option(ENABLE_UBSAN "Build with UndefinedBehaviorSanitizer" OFF)
add_feature_info(ENABLE_UBSAN ENABLE_UBSAN "UndefinedBehaviorSanitizer support.") add_feature_info(ENABLE_UBSAN ENABLE_UBSAN "UndefinedBehaviorSanitizer support.")
option(ENABLE_X11 "Build with X11 support" ON)
add_feature_info(ENABLE_X11 ENABLE_X11 "X11 support.")
option(ENABLE_PIPEWIRE "Build with PipeWire audio output support" ON) option(ENABLE_PIPEWIRE "Build with PipeWire audio output support" ON)
add_feature_info(ENABLE_PIPEWIRE ENABLE_PIPEWIRE "PipeWire audio support.") add_feature_info(ENABLE_PIPEWIRE ENABLE_PIPEWIRE "PipeWire audio support.")
option(ENABLE_PULSEAUDIO "Build with PulseAudio audio output support" ON) option(ENABLE_PULSEAUDIO "Build with PulseAudio audio output support" ON)
add_feature_info(ENABLE_PULSEAUDIO ENABLE_PULSEAUDIO "PulseAudio audio support.") add_feature_info(ENABLE_PULSEAUDIO ENABLE_PULSEAUDIO "PulseAudio audio support.")
if (NOT ENABLE_X11 AND NOT ENABLE_WAYLAND)
message(FATAL_ERROR "Either ENABLE_X11 or ENABLE_WAYLAND must be on")
endif()
add_compile_options( add_compile_options(
"-Wall" "-Wall"
"-Wextra" "-Wextra"
@ -120,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
@ -131,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
@ -144,6 +139,8 @@ set(SOURCES
# Force cimgui to build as a static library. # Force cimgui to build as a static library.
set(IMGUI_STATIC "yes" CACHE STRING "Build as a static library") set(IMGUI_STATIC "yes" CACHE STRING "Build as a static library")
add_definitions("-DCIMGUI_USE_OPENGL2=1")
add_definitions("-DCIMGUI_USE_OPENGL3=1")
add_subdirectory("${PROJECT_TOP}/resources" "${CMAKE_BINARY_DIR}/resources") add_subdirectory("${PROJECT_TOP}/resources" "${CMAKE_BINARY_DIR}/resources")
add_subdirectory("${PROJECT_TOP}/common" "${CMAKE_BINARY_DIR}/common" ) add_subdirectory("${PROJECT_TOP}/common" "${CMAKE_BINARY_DIR}/common" )
@ -154,6 +151,7 @@ add_subdirectory("${PROJECT_TOP}/repos/cimgui" "${CMAKE_BINARY_DIR}/cimgui" E
add_subdirectory(displayservers) add_subdirectory(displayservers)
add_subdirectory(renderers) add_subdirectory(renderers)
configure_file("${PROJECT_TOP}/resources/looking-glass-client.desktop.in" "${CMAKE_BINARY_DIR}/resources/looking-glass-client.desktop" @ONLY)
add_executable(looking-glass-client ${SOURCES}) add_executable(looking-glass-client ${SOURCES})
target_compile_definitions(looking-glass-client PRIVATE CIMGUI_DEFINE_ENUMS_AND_STRUCTS=1) target_compile_definitions(looking-glass-client PRIVATE CIMGUI_DEFINE_ENUMS_AND_STRUCTS=1)
@ -184,4 +182,10 @@ install(TARGETS looking-glass-client
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT binary) COMPONENT binary)
install(FILES "${CMAKE_BINARY_DIR}/resources/looking-glass-client.desktop"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
install(FILES "${PROJECT_TOP}/resources/lg-logo.svg"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps"
RENAME "looking-glass.svg")
feature_summary(WHAT ENABLED_FEATURES DISABLED_FEATURES) feature_summary(WHAT ENABLED_FEATURES DISABLED_FEATURES)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.10)
project(audiodevs LANGUAGES C) project(audiodevs LANGUAGES C)
set(AUDIODEV_H "${CMAKE_BINARY_DIR}/include/dynamic/audiodev.h") set(AUDIODEV_H "${CMAKE_BINARY_DIR}/include/dynamic/audiodev.h")

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.10)
project(audiodev_PipeWire LANGUAGES C) project(audiodev_PipeWire LANGUAGES C)
find_package(PkgConfig) find_package(PkgConfig)

View File

@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2024 The Looking Glass Authors * Copyright © 2017-2025 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
@ -258,6 +258,7 @@ static void pipewire_playbackSetup(int channels, int sampleRate,
struct pw_properties * props = struct pw_properties * props =
pw_properties_new( pw_properties_new(
PW_KEY_APP_NAME , "Looking Glass",
PW_KEY_NODE_NAME , "Looking Glass", PW_KEY_NODE_NAME , "Looking Glass",
PW_KEY_MEDIA_TYPE , "Audio", PW_KEY_MEDIA_TYPE , "Audio",
PW_KEY_MEDIA_CATEGORY, "Playback", PW_KEY_MEDIA_CATEGORY, "Playback",

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.10)
project(audiodev_PulseAudio LANGUAGES C) project(audiodev_PulseAudio LANGUAGES C)
find_package(PkgConfig) find_package(PkgConfig)

View File

@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2024 The Looking Glass Authors * Copyright © 2017-2025 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,4 +1,4 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.10)
project(displayservers LANGUAGES C) project(displayservers LANGUAGES C)
set(DISPLAYSERVER_H "${CMAKE_BINARY_DIR}/include/dynamic/displayservers.h") set(DISPLAYSERVER_H "${CMAKE_BINARY_DIR}/include/dynamic/displayservers.h")
@ -18,9 +18,16 @@ function(add_displayserver name)
add_subdirectory(${name}) add_subdirectory(${name})
endfunction() endfunction()
option(ENABLE_X11 "Build with X11 support" ON)
add_feature_info(ENABLE_X11 ENABLE_X11 "X11 support.")
option(ENABLE_WAYLAND "Build with Wayland support" ON) option(ENABLE_WAYLAND "Build with Wayland support" ON)
add_feature_info(ENABLE_WAYLAND ENABLE_WAYLAND "Wayland support.") add_feature_info(ENABLE_WAYLAND ENABLE_WAYLAND "Wayland support.")
if (NOT ENABLE_X11 AND NOT ENABLE_WAYLAND)
message(FATAL_ERROR "Either ENABLE_X11 or ENABLE_WAYLAND must be on")
endif()
# Add/remove displayservers here! # Add/remove displayservers here!
if (ENABLE_WAYLAND) if (ENABLE_WAYLAND)
add_displayserver(Wayland) add_displayserver(Wayland)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.10)
project(displayserver_Wayland LANGUAGES C) project(displayserver_Wayland LANGUAGES C)
find_package(PkgConfig) find_package(PkgConfig)

View File

@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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,4 +1,4 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.10)
project(wayland_desktops LANGUAGES C) project(wayland_desktops LANGUAGES C)
set(DESKTOP_H "${CMAKE_BINARY_DIR}/include/dynamic/wayland_desktops.h") set(DESKTOP_H "${CMAKE_BINARY_DIR}/include/dynamic/wayland_desktops.h")

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.10)
project(wayland_desktop_libdecor LANGUAGES C) project(wayland_desktop_libdecor LANGUAGES C)
add_library(wayland_desktop_libdecor STATIC add_library(wayland_desktop_libdecor STATIC

View File

@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2024 The Looking Glass Authors * Copyright © 2017-2025 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
@ -130,14 +130,14 @@ static void libdecorCallback(uint32_t events, void * opaque)
static bool libdecor_shellInit( static bool libdecor_shellInit(
struct wl_display * display, struct wl_surface * surface, struct wl_display * display, struct wl_surface * surface,
const char * title, bool fullscreen, const char * title, const char * appId, bool fullscreen,
bool maximize, bool borderless, bool resizable) bool maximize, bool borderless, bool resizable)
{ {
state.libdecor = libdecor_new(display, &libdecorListener); state.libdecor = libdecor_new(display, &libdecorListener);
state.libdecorFrame = libdecor_decorate(state.libdecor, surface, state.libdecorFrame = libdecor_decorate(state.libdecor, surface,
&libdecorFrameListener, NULL); &libdecorFrameListener, NULL);
libdecor_frame_set_app_id(state.libdecorFrame, "looking-glass-client"); libdecor_frame_set_app_id(state.libdecorFrame, appId);
libdecor_frame_set_title(state.libdecorFrame, title); libdecor_frame_set_title(state.libdecorFrame, title);
libdecor_frame_map(state.libdecorFrame); libdecor_frame_map(state.libdecorFrame);

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.10)
project(wayland_desktop_xdg LANGUAGES C) project(wayland_desktop_xdg LANGUAGES C)
add_library(wayland_desktop_xdg STATIC add_library(wayland_desktop_xdg STATIC

View File

@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2024 The Looking Glass Authors * Copyright © 2017-2025 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
@ -130,7 +130,7 @@ static const struct xdg_toplevel_listener xdgToplevelListener = {
}; };
bool xdg_shellInit(struct wl_display * display, struct wl_surface * surface, bool xdg_shellInit(struct wl_display * display, struct wl_surface * surface,
const char * title, bool fullscreen, bool maximize, bool borderless, const char * title, const char * appId, bool fullscreen, bool maximize, bool borderless,
bool resizable) bool resizable)
{ {
if (!state.wmBase) if (!state.wmBase)
@ -147,7 +147,7 @@ bool xdg_shellInit(struct wl_display * display, struct wl_surface * surface,
state.toplevel = xdg_surface_get_toplevel(state.surface); state.toplevel = xdg_surface_get_toplevel(state.surface);
xdg_toplevel_add_listener(state.toplevel, &xdgToplevelListener, NULL); xdg_toplevel_add_listener(state.toplevel, &xdgToplevelListener, NULL);
xdg_toplevel_set_title(state.toplevel, title); xdg_toplevel_set_title(state.toplevel, title);
xdg_toplevel_set_app_id(state.toplevel, "looking-glass-client"); xdg_toplevel_set_app_id(state.toplevel, appId);
if (fullscreen) if (fullscreen)
xdg_toplevel_set_fullscreen(state.toplevel, NULL); xdg_toplevel_set_fullscreen(state.toplevel, NULL);

View File

@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2024 The Looking Glass Authors * Copyright © 2017-2025 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
@ -102,7 +102,11 @@ void waylandEGLSwapBuffers(EGLDisplay display, EGLSurface surface, const struct
wl_surface_set_buffer_scale(wlWm.surface, 1); wl_surface_set_buffer_scale(wlWm.surface, 1);
if (!wlWm.viewport) if (!wlWm.viewport)
wlWm.viewport = wp_viewporter_get_viewport(wlWm.viewporter, wlWm.surface); wlWm.viewport = wp_viewporter_get_viewport(wlWm.viewporter, wlWm.surface);
wp_viewport_set_source(wlWm.viewport, 0, 0, width * wlWm.scale, height * wlWm.scale); wp_viewport_set_source(
wlWm.viewport,
wl_fixed_from_int(-1), wl_fixed_from_int(-1),
wl_fixed_from_int(-1), wl_fixed_from_int(-1)
);
wp_viewport_set_destination(wlWm.viewport, width, height); wp_viewport_set_destination(wlWm.viewport, width, height);
} }
else else

View File

@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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
@ -209,7 +209,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 +232,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 +253,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-2024 The Looking Glass Authors * Copyright © 2017-2025 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
@ -34,7 +34,7 @@ typedef struct WL_DesktopOps
bool (*shellInit)( bool (*shellInit)(
struct wl_display * display, struct wl_surface * surface, struct wl_display * display, struct wl_surface * surface,
const char * title, bool fullscreen, bool maximize, const char * title, const char * appId, bool fullscreen, bool maximize,
bool borderless, bool resizable); bool borderless, bool resizable);
void (*shellAckConfigureIfNeeded)(void); void (*shellAckConfigureIfNeeded)(void);

View File

@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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,4 +1,4 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.10)
project(wayland_protocol LANGUAGES C) project(wayland_protocol LANGUAGES C)
find_package(PkgConfig) find_package(PkgConfig)

View File

@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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
@ -121,7 +121,7 @@ static bool waylandInit(const LG_DSInitParams params)
for(int i = 0; i < WL_DESKTOP_COUNT; ++i) for(int i = 0; i < WL_DESKTOP_COUNT; ++i)
if (strcmp(WL_Desktops[i]->compositor, compositor) == 0) if (strcmp(WL_Desktops[i]->compositor, compositor) == 0)
{ {
wlWm.desktop = WL_Desktops[0]; wlWm.desktop = WL_Desktops[i];
break; break;
} }
} }
@ -159,7 +159,7 @@ static bool waylandInit(const LG_DSInitParams params)
return false; return false;
wlWm.desktop->setSize(params.w, params.h); wlWm.desktop->setSize(params.w, params.h);
if (!waylandWindowInit(params.title, params.fullscreen, params.maximize, if (!waylandWindowInit(params.title, params.appId, params.fullscreen, params.maximize,
params.borderless, params.resizable)) params.borderless, params.resizable))
return false; return false;
@ -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-2024 The Looking Glass Authors * Copyright © 2017-2025 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
@ -277,6 +277,7 @@ 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);
@ -301,7 +302,7 @@ bool waylandRegistryInit(void);
void waylandRegistryFree(void); void waylandRegistryFree(void);
// window module // window module
bool waylandWindowInit(const char * title, bool fullscreen, bool maximize, bool borderless, bool resizable); bool waylandWindowInit(const char * title, const char * appId, bool fullscreen, bool maximize, bool borderless, bool resizable);
void waylandWindowFree(void); void waylandWindowFree(void);
void waylandWindowUpdateScale(void); void waylandWindowUpdateScale(void);
void waylandSetWindowSize(int x, int y); void waylandSetWindowSize(int x, int y);

View File

@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2024 The Looking Glass Authors * Copyright © 2017-2025 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
@ -85,7 +85,7 @@ static const struct wl_surface_listener wlSurfaceListener = {
.leave = wlSurfaceLeaveHandler, .leave = wlSurfaceLeaveHandler,
}; };
bool waylandWindowInit(const char * title, 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 = wl_fixed_from_int(1);
@ -113,7 +113,7 @@ bool waylandWindowInit(const char * title, bool fullscreen, bool maximize, bool
wl_surface_add_listener(wlWm.surface, &wlSurfaceListener, NULL); wl_surface_add_listener(wlWm.surface, &wlSurfaceListener, NULL);
if (!wlWm.desktop->shellInit(wlWm.display, wlWm.surface, if (!wlWm.desktop->shellInit(wlWm.display, wlWm.surface,
title, fullscreen, maximize, borderless, resizable)) title, appId, fullscreen, maximize, borderless, resizable))
return false; return false;
wl_surface_commit(wlWm.surface); wl_surface_commit(wlWm.surface);

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.10)
project(displayserver_X11 LANGUAGES C) project(displayserver_X11 LANGUAGES C)
find_package(PkgConfig) find_package(PkgConfig)

View File

@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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
@ -343,7 +343,7 @@ static bool x11Init(const LG_DSInitParams params)
XClassHint hint = XClassHint hint =
{ {
.res_name = strdup(params.title), .res_name = strdup(params.title),
.res_class = strdup("looking-glass-client") .res_class = strdup(params.appId)
}; };
XSetClassHint(x11.display, x11.window, &hint); XSetClassHint(x11.display, x11.window, &hint);
free(hint.res_name); free(hint.res_name);
@ -699,7 +699,7 @@ static bool x11Init(const LG_DSInitParams params)
XMoveWindow(x11.display, x11.window, params.x, params.y); XMoveWindow(x11.display, x11.window, params.x, params.y);
if (params.fullscreen) if (params.fullscreen)
x11SetFullscreen(true); x11.doFullscreenOnExpose = true;
XSetLocaleModifiers(""); // Load XMODIFIERS XSetLocaleModifiers(""); // Load XMODIFIERS
x11.xim = XOpenIM(x11.display, 0, 0, 0); x11.xim = XOpenIM(x11.display, 0, 0, 0);
@ -946,6 +946,11 @@ static int x11EventThread(void * unused)
{ {
atomic_store(&x11.lastWMEvent, microtime()); atomic_store(&x11.lastWMEvent, microtime());
x11.invalidateAll = true; x11.invalidateAll = true;
if (x11.doFullscreenOnExpose)
{
x11SetFullscreen(true);
x11.doFullscreenOnExpose = false;
}
break; break;
} }
@ -1082,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;
@ -1224,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;
@ -1275,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;
@ -1305,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;
} }
@ -1316,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;
} }
@ -2012,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-2024 The Looking Glass Authors * Copyright © 2017-2025 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
@ -71,6 +71,7 @@ struct X11DSState
_Atomic(uint64_t) lastWMEvent; _Atomic(uint64_t) lastWMEvent;
bool invalidateAll; bool invalidateAll;
bool doFullscreenOnExpose;
int xpresentOp; int xpresentOp;
bool jitRender; bool jitRender;

View File

@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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
@ -84,6 +84,7 @@ LG_DSPointer;
typedef struct LG_DSInitParams typedef struct LG_DSInitParams
{ {
const char * title; const char * title;
const char * appId;
int x, y, w, h; int x, y, w, h;
bool center; bool center;
bool fullscreen; bool fullscreen;
@ -182,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);
@ -252,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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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,4 +1,4 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.10)
project(renderers LANGUAGES C) project(renderers LANGUAGES C)
set(RENDERER_H "${CMAKE_BINARY_DIR}/include/dynamic/renderers.h") set(RENDERER_H "${CMAKE_BINARY_DIR}/include/dynamic/renderers.h")

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.10)
project(renderer_EGL LANGUAGES C CXX) project(renderer_EGL LANGUAGES C CXX)
find_package(PkgConfig) find_package(PkgConfig)

View File

@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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
@ -437,21 +437,24 @@ bool egl_desktopRender(EGL_Desktop * desktop, unsigned int outputWidth,
{ {
EGL_Texture * tex; EGL_Texture * tex;
int width, height; int width, height;
bool dma;
if (unlikely(desktop->useSpice)) if (unlikely(desktop->useSpice))
{ {
tex = desktop->spiceTexture; tex = desktop->spiceTexture;
width = desktop->spiceWidth; width = desktop->spiceWidth;
height = desktop->spiceHeight; height = desktop->spiceHeight;
dma = false;
} }
else else
{ {
tex = desktop->texture; tex = desktop->texture;
width = desktop->width; width = desktop->width;
height = desktop->height; height = desktop->height;
dma = desktop->useDMA;
} }
if (unlikely(outputWidth == 0 && outputHeight == 0)) if (unlikely(outputWidth == 0 || outputHeight == 0))
DEBUG_FATAL("outputWidth || outputHeight == 0"); DEBUG_FATAL("outputWidth || outputHeight == 0");
enum EGL_TexStatus status; enum EGL_TexStatus status;
@ -470,7 +473,7 @@ bool egl_desktopRender(EGL_Desktop * desktop, unsigned int outputWidth,
if (atomic_exchange(&desktop->processFrame, false) || if (atomic_exchange(&desktop->processFrame, false) ||
egl_postProcessConfigModified(desktop->pp)) egl_postProcessConfigModified(desktop->pp))
egl_postProcessRun(desktop->pp, tex, desktop->mesh, egl_postProcessRun(desktop->pp, tex, desktop->mesh,
width, height, outputWidth, outputHeight, desktop->useDMA); width, height, outputWidth, outputHeight, dma);
unsigned int finalSizeX, finalSizeY; unsigned int finalSizeX, finalSizeY;
EGL_Texture * texture = egl_postProcessGetOutput(desktop->pp, EGL_Texture * texture = egl_postProcessGetOutput(desktop->pp,
@ -606,9 +609,9 @@ void egl_desktopSpiceDrawFill(EGL_Desktop * desktop, int x, int y, int width,
for(int x = 0; x < width; ++x) for(int x = 0; x < width; ++x)
line[x] = color; line[x] = color;
for(; y < height; ++y) for(int dy = 0; dy < height; ++dy)
egl_textureUpdateRect(desktop->spiceTexture, egl_textureUpdateRect(desktop->spiceTexture,
x, y, width, 1, width, sizeof(line), (uint8_t *)line, false); x, y + dy, width, 1, width, sizeof(line), (uint8_t *)line, false);
atomic_store(&desktop->processFrame, true); atomic_store(&desktop->processFrame, true);
} }
@ -624,4 +627,5 @@ void egl_desktopSpiceDrawBitmap(EGL_Desktop * desktop, int x, int y, int width,
void egl_desktopSpiceShow(EGL_Desktop * desktop, bool show) void egl_desktopSpiceShow(EGL_Desktop * desktop, bool show)
{ {
desktop->useSpice = show; desktop->useSpice = show;
atomic_store(&desktop->processFrame, true);
} }

View File

@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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
@ -196,7 +196,7 @@ static bool egl_texBufferStreamUpdate(EGL_Texture * texture,
const uint8_t * src = update->buffer; const uint8_t * src = update->buffer;
for(int y = 0; y < update->height; ++y) for(int y = 0; y < update->height; ++y)
{ {
memcpy(dst, src, update->pitch); memcpy(dst, src, update->width * texture->format.bpp);
dst += texture->format.pitch; dst += texture->format.pitch;
src += update->pitch; src += update->pitch;
} }
@ -206,8 +206,8 @@ static bool egl_texBufferStreamUpdate(EGL_Texture * texture,
const uint8_t * src = update->buffer + update->pitch * update->height; const uint8_t * src = update->buffer + update->pitch * update->height;
for(int y = 0; y < update->height; ++y) for(int y = 0; y < update->height; ++y)
{ {
src -= update->stride; src -= update->pitch;
memcpy(dst, src, update->stride); memcpy(dst, src, update->width * texture->format.bpp);
dst += texture->format.pitch; dst += texture->format.pitch;
} }
} }

View File

@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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-2024 The Looking Glass Authors * Copyright © 2017-2025 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,4 +1,4 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.10)
project(renderer_Opengl LANGUAGES C CXX) project(renderer_Opengl LANGUAGES C CXX)
find_package(PkgConfig) find_package(PkgConfig)

View File

@ -1,6 +1,6 @@
/** /**
* Looking Glass * Looking Glass
* Copyright © 2017-2024 The Looking Glass Authors * Copyright © 2017-2025 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
@ -622,13 +622,13 @@ static void opengl_spiceDrawFill(LG_Renderer * renderer, int x, int y, int width
glBindTexture(GL_TEXTURE_2D, this->textures[SPICE_TEXTURE]); glBindTexture(GL_TEXTURE_2D, this->textures[SPICE_TEXTURE]);
glPixelStorei(GL_UNPACK_ALIGNMENT , 4 ); glPixelStorei(GL_UNPACK_ALIGNMENT , 4 );
glPixelStorei(GL_UNPACK_ROW_LENGTH, width); glPixelStorei(GL_UNPACK_ROW_LENGTH, width);
for(; y < height; ++y) for(int dy = 0; dy < height; ++dy)
glTexSubImage2D glTexSubImage2D
( (
GL_TEXTURE_2D, GL_TEXTURE_2D,
0 , 0 ,
x , x ,
y , y + dy ,
width , width ,
1 , 1 ,
GL_BGRA, GL_BGRA,

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