Quantum
71901414d1
[client] overlay: realign cursor when turning off overlay
...
This is only done in non-capture mode to avoid messing up games.
2022-01-24 17:07:15 +11:00
Geoffrey McRae
96fa8891c8
[client] egl: fixed incorrect drawing of masked color cursors
2022-01-24 06:56:32 +11:00
Geoffrey McRae
1082875b8e
[client] opengl: fix startup since ImGui upgrade
2022-01-24 06:42:16 +11:00
Geoffrey McRae
dc918c55b6
[client] main: only copy the needed cursor data instead of everything
2022-01-24 06:36:15 +11:00
Geoffrey McRae
a8ba014b52
[client] main: lgmpClientMessageDone is not idempotent
2022-01-24 04:10:49 +11:00
Quantum
9a6aa3ce66
[client] egl: remove duplicate #include "app.h"
2022-01-23 08:49:15 +11:00
Quantum
f2fbb2b27c
[client] opengl: make draw functions static
2022-01-23 08:49:01 +11:00
Geoffrey McRae
9601bc677f
[client] audio: report the buffered frames and not the buffer length
2022-01-22 16:06:16 +11:00
Geoffrey McRae
c84879717f
[client] audio: fix failure to properly handle restart if draining
2022-01-20 07:02:00 +11:00
Geoffrey McRae
b3c81bcedf
[client] audio: fix use after free race
2022-01-19 18:50:39 +11:00
Geoffrey McRae
15f76339c8
[client] audio: move the memory copy into the pull function
2022-01-19 10:29:49 +11:00
Geoffrey McRae
04ae9217e8
[client] audio: allow the audiodev to determine the start fill level
2022-01-19 01:52:19 +11:00
Geoffrey McRae
46da447429
[client] audio: fix latency calculation
2022-01-19 00:58:48 +11:00
Geoffrey McRae
4b080f7610
[client] audio: don't lock when consuming frames from the buffer
2022-01-19 00:25:52 +11:00
Geoffrey McRae
d6bbc4f89c
[client] audio/pw: return the actual playback latency
2022-01-19 00:03:16 +11:00
Geoffrey McRae
4fadf3a130
[client] audio: tell the audiodev to stop on the last packet, not after
2022-01-18 23:43:12 +11:00
Geoffrey McRae
73dc08e5f9
[client] audio: remove duplicated line
2022-01-18 23:42:02 +11:00
Geoffrey McRae
07c92ec2e8
[client] audio: drain buffers on stop instead of just discarding them
2022-01-18 23:39:05 +11:00
Geoffrey McRae
b334f22223
[client] audio: rework audiodevs to be pull model from a common buffer
2022-01-18 09:02:44 +11:00
Geoffrey McRae
aad65c1cab
[client] graphs: overlay on removal of graph
2022-01-17 22:53:52 +11:00
Geoffrey McRae
0ad26b7da7
[client] audio: redraw the graphs if they have been updated
2022-01-17 22:49:19 +11:00
Geoffrey McRae
775ac7ce8b
[client] audio: reduce timing graph sample count to 30 seconds
2022-01-17 22:23:37 +11:00
Geoffrey McRae
689cc53255
[client] audio: add audio playback latency interface and graph
2022-01-17 22:13:41 +11:00
Geoffrey McRae
5629655f74
[client] audio/pw: fix memory leak and gracefully shutdown
2022-01-17 22:10:41 +11:00
Geoffrey McRae
54e7542414
[client] overlay/graph: actually remove unregistered overlays
...
ll now supports removal of elements, so actually do it
2022-01-17 22:09:41 +11:00
Geoffrey McRae
464fee3e20
[client] overlay/graphs: allow the graph to have a custom title format
2022-01-17 22:08:56 +11:00
Geoffrey McRae
42ed0d7638
[client] app: allow key-repeat to work with keybinds
2022-01-17 20:33:57 +11:00
Geoffrey McRae
5a3fe151e4
[client] main: don't use Linux keybinds if the guest is not Linux
2022-01-17 20:26:45 +11:00
Jonathan Rubenstein
745169fae2
[client] Add capture mode support for media keys
...
Supports Play/Pause, Stop, Next, and Previous
2022-01-17 15:09:36 +11:00
Jonathan Rubenstein
7f79352320
[client] Add support for volume keys in capture mode
...
These include Volume Up, Volume Down, and Mute
Co-authored-by: Quantum <quantum2048@gmail.com>
2022-01-17 15:09:36 +11:00
Quantum
b020372972
[client] imgui: allow arrows to be displayed
2022-01-17 15:09:03 +11:00
Quantum
5fe529f213
[client] spice: allow volume control keys to be sent to the guest
...
These are implemented as ScrollLock+Up/Down for volume up and down, and
ScrollLock+M to toggle audio mute. These should prove useful especially
when Looking Glass now supports streaming audio, and the volume is
defined in the guest and set on the output stream.
2022-01-17 15:09:03 +11:00
Quantum
7c91c922e6
[client] input: avoid reentrancy when realigning guest cursor
...
This prevents LGMP_ERR_QUEUE_FULL from happening with high polling rate
mice, which is caused by receiving many more mouse events while the
guest cursor warps, triggering more warps.
2022-01-15 19:25:30 +11:00
Chris Spencer
f635077a2c
[client] egl: increase texture processing timeout
...
On my machine (Intel UHD Graphics 770), texture processing occasionally
(about 5% of the time) takes more than 20ms (the highest I have seen is
around 32ms) when the host resolution is 2560x1440. This results in the
frame being discarded and the client displays a stale image. Increase the
timeout to 40ms.
2022-01-14 12:31:02 +11:00
Chris Spencer
786a252b23
[client] x11: don't use primary selection for clipboard
...
This behaviour is more consistent with other applications where text
selections do not influence explicit clipboard operations.
2022-01-13 08:18:56 +11:00
Geoffrey McRae
6bba9bc25d
[client/common] move ll from the client into the common code module
2022-01-12 12:22:18 +11:00
Geoffrey McRae
1851002fc1
[client] all: remove ll_walk
and migrate over to ll_forEachNL
2022-01-12 12:17:29 +11:00
Geoffrey McRae
b99e1ea38e
[client] ll: fix error in ll_forEachNL macro
2022-01-12 12:17:06 +11:00
Geoffrey McRae
2ecfa0a3ec
[client] msg: add missing header file
2022-01-12 10:08:29 +11:00
Geoffrey McRae
ca0bc7c514
[client] close message boxes if the client connects
2022-01-12 10:04:16 +11:00
Geoffrey McRae
4122841b09
[client] spice: fix memory leak
2022-01-12 10:03:56 +11:00
Geoffrey McRae
e94252ad65
squash with ll
2022-01-12 10:03:31 +11:00
Geoffrey McRae
6fc0c69b2e
[client] overlay/msg: provide a method to close messages from code
2022-01-12 09:35:09 +11:00
Geoffrey McRae
ced952a4c6
[client] ll: add new functionallity to allow removal of items
2022-01-12 09:33:36 +11:00
Geoffrey McRae
4411d21135
[client] spice: update submodule to prevent segfault on shutdown
2022-01-12 07:42:01 +11:00
Chris Spencer
8a61c8ebc2
[client] audio/pw: use rate matching
...
This can prevent glitches when the PipeWire quantum size changes.
2022-01-11 09:45:30 +11:00
Chris Spencer
ef9b2958ec
[client] audio/pw: set maximum node latency
...
This prevents severe buffer underruns if the PipeWire quantum is bigger
than the ring buffer size. This could happen if a media player is running
at the same time as Looking Glass if it requests a very large quantum size,
for example.
2022-01-11 09:45:30 +11:00
Chris Spencer
e72e138267
[client] audio/pw: delay playback to avoid glitches
2022-01-11 09:45:30 +11:00
Chris Spencer
4c389a9274
[client] audio/pw: flush playback buffers before stopping
...
This stops the end of the playback from being truncated. It also prevents
an audible glitch when playback next starts due to the truncated data being
left behind in the ring buffer.
2022-01-11 09:45:30 +11:00
Chris Spencer
b9c646074d
[client] audio/pw: don't discard playback data
...
This can cause significant glitching, particularly around the start of
playback.
2022-01-11 09:45:30 +11:00
Geoffrey McRae
0fc87576f3
[client] core: fallback to manual realignment if the LGMP message fails
2022-01-09 21:25:40 +11:00
Geoffrey McRae
24193aaaa6
[client] main: added user feedback during LGMP/KVMFR version check
2022-01-09 02:15:18 +11:00
Geoffrey McRae
f9b907a6b1
[client] msg: allow messages to contain blank lines and separators
2022-01-09 02:14:01 +11:00
Geoffrey McRae
d42e409728
[client] spice: show message when connected to the wrong guest
2022-01-08 19:32:58 +11:00
Geoffrey McRae
780cf5f362
[client] overlay: add modal message dialog support
2022-01-08 18:58:48 +11:00
Geoffrey McRae
0080e5f1b9
[client] overlay: add app_invalidateOverlay
method
2022-01-08 15:18:40 +11:00
Geoffrey McRae
ad6fa5a504
[client] app: move all alert management into overlay/alert.c
2022-01-08 14:33:12 +11:00
Geoffrey McRae
db2e38ae4d
[client] overlay: add 25Hz tick
function
...
This allows an overlay to manage itself for timed events like
alerts/messages, etc.
2022-01-08 14:33:07 +11:00
Geoffrey McRae
35334333ac
[client] imgui: render twice for alerts
...
When using jitRender, or on the first frame of an alert the window
doesn't get resized immediately causing it to cut off the end of the
text.
ImGui needs two passes to calulate the bounding box for automatically
sized windows, this is per it's design and not a bug, see:
https://github.com/ocornut/imgui/issues/2158#issuecomment-434223618
2022-01-08 00:46:16 +11:00
Geoffrey McRae
ec0bd6adc8
[client] imgui: update to cimgui 1.86
2022-01-08 00:26:12 +11:00
Quantum
8e8d8834de
[client] main: print guest CPU socket count information
2022-01-07 21:03:20 +11:00
Geoffrey McRae
32134b33ea
[client] audio: remove more debug output spam
2022-01-07 16:35:46 +11:00
Geoffrey McRae
9d894065c8
[client] audio: remove debug spam
2022-01-07 16:27:29 +11:00
Geoffrey McRae
7263159428
[client] audio/pw: implement record support
2022-01-07 00:54:44 +11:00
Geoffrey McRae
52f06ec332
[client] audio: don't call record.mute
if it's not supported
2022-01-07 00:22:35 +11:00
Geoffrey McRae
7f93bbd675
[client] audio/pw: fixed another search/replace mistake
2022-01-07 00:09:34 +11:00
Geoffrey McRae
5c20a851c6
[client] audio/pw: fix search/replace error
2022-01-06 23:58:02 +11:00
Geoffrey McRae
11acaa2957
[client] audio/pw: refactor to use playback
for playback methods
2022-01-06 23:56:12 +11:00
Geoffrey McRae
fe7973ea24
[client] audio: implement record interface and glue
2022-01-06 23:49:20 +11:00
Geoffrey McRae
ff2ca20235
[client] audio: always store the volume & mute state for restore
2022-01-06 23:31:39 +11:00
Geoffrey McRae
a114ea3de4
[client] audio: move audio code into it's own unit
2022-01-06 23:24:13 +11:00
Geoffrey McRae
e6bd36ec7c
[client] audio: refactor audio
to playback
and add record
funcs
2022-01-06 22:47:22 +11:00
Geoffrey McRae
208b722348
[client] main: failure to find a renderer is an error
2022-01-06 15:19:35 +11:00
Geoffrey McRae
67509d7a2d
[client] main: format the guest information a bit better
2022-01-06 15:19:16 +11:00
Geoffrey McRae
c20bb27b67
[client] main: move checkUUID to after informational prints are done
...
This change makes the client print the check failure as the last thing
before disconnecting making it more obvious to the user.
2022-01-06 15:18:10 +11:00
Geoffrey McRae
8cdeaceed9
[client] main: fix reversed check logic from testing/debug
2022-01-06 14:40:34 +11:00
Geoffrey McRae
7bcd0dd97f
[client] main: if spice is in use check the guest uuid matches
...
If the guest supports sending us it's UUID and PureSpice has also
reported the guest's UUID, check them to see if the user has
accidentially connected to the wrong spice socket.
2022-01-06 14:38:46 +11:00
Geoffrey McRae
7ccd202d36
[client] main: fix out by one error in the bounds check for os type
2022-01-05 20:40:13 +11:00
Geoffrey McRae
177a997883
[client] main: parse the KVMFR records and log the details
2022-01-05 20:27:43 +11:00
Geoffrey McRae
952ebea2c5
[all] refresh copyright dates
2022-01-05 19:42:46 +11:00
Geoffrey McRae
0d27092ef5
[all] move min/max and upcast macros into common/util.h
2022-01-05 19:41:57 +11:00
Geoffrey McRae
ba9f2b85b6
[host/client] kvmfr: update to include extra user data about the VM
...
This change allows the host to provide information to the client about
how the VM is configured, information such as the UUID, CPU
configuration and capture method both for informational display in the
client as well as debugging in the client's logs.
The format of the records allows this to be extended later with new
record types without needing to bump the KVMFR version.
2022-01-05 19:18:43 +11:00
Geoffrey McRae
d708651c53
[client] egl: check for null gl strings
2022-01-05 12:38:38 +11:00
Geoffrey McRae
0d00936aac
[client] spice: update PureSpice submodule
2022-01-04 19:06:14 +11:00
Geoffrey McRae
4b8255aa28
[client] spice: allow spice startup to happen in parallel
2022-01-01 21:07:55 +11:00
Geoffrey McRae
c8b4787cb1
[client] don't report a spice error on graceful shutdown
2021-12-30 21:02:53 +11:00
Geoffrey McRae
d43126f433
[client] main: release the grab if the host application is stopped
2021-12-30 17:08:19 +11:00
Geoffrey McRae
764e52fb20
[client] undo commented code from debugging
2021-12-30 13:19:59 +11:00
Geoffrey McRae
6f17e89b16
[host] lgmp: update to fix regression in initialization of the header
2021-12-30 13:00:56 +11:00
Geoffrey McRae
c74d48691f
[client] spice: update submodule and update to use new PSConfig members
2021-12-29 20:22:07 +11:00
Geoffrey McRae
d1a765c179
[client] spice: update PureSpice submodule and adjust for new API usage
2021-12-29 16:02:22 +11:00
Geoffrey McRae
17b77cfbc1
[client] spice: update PureSpice submodule and update includes
2021-12-29 00:18:25 +11:00
Geoffrey McRae
65ba2e8df9
[client] spice: update submodule and refactor calls & types
2021-12-28 22:04:35 +11:00
Geoffrey McRae
35efa551ef
[client] egl: determine mouse scale using both horiz and vert size
2021-12-28 19:04:24 +11:00
Quantum
136737f25b
[client] egl: simplify EGL torus code
2021-12-28 10:19:36 +11:00
Geoffrey McRae
95987a9c91
[client] core: set the correct cursor when exiting overlay
2021-12-27 11:52:06 +11:00
Geoffrey McRae
bbd9c84896
[client] core: invalidate the pointer state when overlay is disabled
2021-12-27 11:22:12 +11:00
Geoffrey McRae
bb74a9d9c8
[client] core: don't try to send LGMP messages if the video is stopped
...
If the video stream is stopped the LGMP session is not valid, so we
can't send messages to the client.
2021-12-27 09:55:56 +11:00
Geoffrey McRae
02ec25b008
[client] audio/pw: it's Looking Glass, not LookingGlass
2021-12-26 18:49:35 +11:00
Geoffrey McRae
90dd1f3913
[client] audio/pa: added initial pulseaudio implementation
2021-12-26 18:22:51 +11:00
Geoffrey McRae
9fa643484c
[client] audio/pw: use scaling forumula provided by quantum
2021-12-26 11:09:42 +11:00
Geoffrey McRae
64b64b61be
[client] audio/pw: implement volume and mute control
2021-12-26 11:09:42 +11:00
Geoffrey McRae
433a5420cb
[client] audio: update PureSpice and add support for volume control/mute
2021-12-26 11:09:42 +11:00
Geoffrey McRae
e408ea51e2
[client] audio/pw: gracefully shutdown when asked to
2021-12-26 11:09:42 +11:00
Geoffrey McRae
cca6492069
[client] audio: call audioDev->free on spice thread exit
2021-12-26 11:09:42 +11:00
Geoffrey McRae
ebdc847ef1
[client] audio/pw: don't re-create an idle stream with matching format
2021-12-26 11:09:42 +11:00
Geoffrey McRae
2ea24516d2
[client] audio/pw: limit how much data gets buffered to reduce latency
2021-12-26 11:09:42 +11:00
Geoffrey McRae
dd04a46403
[client] audio/pw: make use of the new ringbuffer consume/append funcs
2021-12-26 11:09:42 +11:00
Geoffrey McRae
f403033ab1
[client] audio/pw: properly manage the stream state
2021-12-26 11:09:42 +11:00
Geoffrey McRae
11ef94c134
[client] audio/pw: set the node name
2021-12-26 11:09:42 +11:00
Geoffrey McRae
75e46128d4
[client] audio/pw: don't actually stop when SPICE signals a stop
2021-12-26 11:09:42 +11:00
Geoffrey McRae
e810577317
[client] audio: initial addition of PipeWire audio support via SPICE
2021-12-26 11:09:42 +11:00
Geoffrey McRae
d69069fb09
[client] egl: keep the mouse cursor 1:1 when downscaling
...
This keeps the cursor a usable size when the guest is running a high
resolution and downscaling (ie, 4K -> FHD).
2021-12-26 11:08:42 +11:00
Quantum
15ec80e80d
[client] input: fix race between window size and guest cursor
...
g_state.posInfoValid could become valid after the guest reports the
cursor position, in which case we did not show the cursor until another
update occurs.
This commit eliminates the race by performing the update when
g_state.posInfoValid becomes true.
2021-12-24 13:16:52 +11:00
Quantum
eea0ced627
[client] wayland: handle NULL wl_keyboard on destruction
2021-12-24 10:22:23 +11:00
Quantum
94684324f4
[client] wayland: don't create confines on uncapture without wl_pointer
2021-12-24 10:17:16 +11:00
Quantum
194afa2d75
[client] wayland: create wl_relative_pointer when creating wl_pointer
2021-12-24 10:17:16 +11:00
Quantum
d96b2ef1fb
[client] wayland: clean up objects when wl_pointer disappears
2021-12-24 10:17:16 +11:00
Geoffrey McRae
ad40ea4195
[client] x11: don't override the focus state if no EWMH focus support
2021-12-22 11:25:54 +11:00
Geoffrey McRae
65948034dd
[client] x11: be more agressive grabbing the pointer
2021-12-21 21:51:43 +11:00
Geoffrey McRae
27c7054505
[client] x11: protect against msc overflow with jitRender
2021-12-21 10:47:55 +11:00
Geoffrey McRae
02b59ba8f7
[client] x11: don't use the atomic msc value when we already have it
2021-12-21 10:47:11 +11:00
Quantum
a5727262cd
[client] wayland: make cursor change work without wl_pointer
2021-12-16 11:36:39 +11:00
Geoffrey McRae
43545a4e17
[all] cmake: refuse to perform in-source builds
2021-12-15 10:56:27 +11:00
Geoffrey McRae
adbe333414
[client] egl: dmabuf can be used without GL_EXT_buffer_storage support
2021-12-15 06:10:30 +11:00
Geoffrey McRae
5f80ce91e8
[client] x11: fix broken grab retry logic
2021-12-15 01:43:09 +11:00
Geoffrey McRae
b6fa296d5a
[client] x11: work around issue with desktop switch on i3
...
For an unknwon reason when LG is on another desktop (hidden) and the
user switches to that desktop, the first attempt to grab the pointer
results in a GrabFrozen result. This adds some simple retry logic to
attempt again after a short (100ms) delay which seems to resolve the
issue.
2021-12-15 00:23:44 +11:00
Geoffrey McRae
2e170ad06f
[client] x11: properly detect WMEH support for focus events
2021-12-15 00:17:33 +11:00
Quantum
15066c7345
[client] egl: handle eglQuerySurface(EGL_BUFFER_AGE_EXT) error
2021-12-14 14:35:30 +11:00
Geoffrey McRae
88a95aeab0
[client] x11: fix issue with grab when clicking on the unfocused window
...
Fixes #856
2021-12-10 05:27:58 +11:00
Geoffrey McRae
abd6502c9d
[client] x11: cosmetics
2021-12-09 19:53:34 +11:00
Quantum
58f83da7bb
[client] egl: increase the damage box for the cursor
2021-12-02 22:07:37 +11:00
Quantum
3e9a21d3b9
[client] egl: use linear filter when not scaling
...
This appears to eliminate artifacts related to non-full screen paints
due to precision errors with the nearest filter.
2021-12-02 22:07:24 +11:00
Geoffrey McRae
9780f51558
[client] x11: fix failure to set window position correctly when set
2021-11-30 13:04:39 +11:00
Geoffrey McRae
8167ef2c4a
[client] egl: make use of glsl's textureSize function
2021-11-12 07:41:59 +11:00
Geoffrey McRae
a21eee26ab
[client] main: fix buffer overflow due to cursor data size change
2021-11-02 01:01:17 +11:00
Geoffrey McRae
e82f8911a6
[client] main: malloc buffer for cursor data instead of using the stack
2021-11-01 13:45:30 +11:00
Geoffrey McRae
67ea8e06ba
[client] egl: use alloca
instead of typecasted char array
2021-10-24 22:57:21 +11:00
Quantum
ad6e3f96e6
[client] egl: reset damage on renderer restart
2021-10-23 18:38:21 +11:00
Geoffrey McRae
fe712b7ec9
[client] egl: damage the full screen if the frame format changes
2021-10-22 18:51:49 +11:00
Geoffrey McRae
9c5e34df0f
[client] x11: handle EINTR properly in epoll loop
2021-10-20 15:40:50 +11:00
Geoffrey McRae
dca5da02a0
[client] egl: fix undefined behaviour with zero size array
2021-10-20 13:34:16 +11:00
Quantum
2858ad3f7e
[client] egl: fallback when EGL_RENDER_BUFFER fails
...
This allows the client to work when the OpenGL implementation fails if
EGL_RENDER_BUFFER is passed, printing a warning. This should fix issues
with Nvidia proprietary drivers on Wayland.
2021-10-20 11:31:00 +11:00
Quantum
9ddd260b22
[client] egl: log glCheckFramebufferStatus error
2021-10-20 11:30:40 +11:00
Geoffrey McRae
bc34dc9e24
[client] egl: blame NVIDIA if dmabuf fails on NVIDIA hardware
...
NVIDIA still do not implement a complete/working DMABUF implementation
yet advertise support. Best to tell the public to complain to NVIDIA
instead of assuming it's a LG bug or an issue with their system.
2021-10-20 11:28:29 +11:00
Geoffrey McRae
edc9825c04
[client] egl: check for invalid desktop render dimensions
2021-10-20 11:17:29 +11:00
Geoffrey McRae
70a751b58d
[client] egl/filters: bypass setup/prepare logic if disabled/inactive
...
filters are now not run if `egl_filterSetup` returns false, as such we
do not need additional `enable` checks in `prepare` or `run` and we can
bypass the filters even earlier if they are not enabled reducing load.
2021-10-20 10:57:53 +11:00
Quantum
fc037ccc95
[client] egl: handle filter setup returning false
...
As discussed, this should just skip the filter as if it's disabled.
2021-10-20 10:48:18 +11:00
Quantum
74418106de
[client] egl: skip downscale filter setup when not enabled
...
Since this->prepared will never be set to true unless the filter is
enabled, this results in the framebuffer setup being done every frame
for no reason, causing a lot of texture reallocations.
2021-10-20 10:47:59 +11:00
Quantum
8dcf7af791
[client] egl: fix parentheses in IDX_AGO definition
...
The old definition could break if complex expressions were passed in
as arguments.
2021-10-17 06:10:30 +11:00