Commit Graph

1789 Commits

Author SHA1 Message Date
Geoffrey McRae
4c1893fe20 [all] fix numerous memory leaks at application shutdown 2021-01-24 21:47:53 +11:00
Geoffrey McRae
086f73721d [client] egl: remove accidental commit 2021-01-24 19:19:43 +11:00
Geoffrey McRae
202739c5be [client] egl: better debug output for EGL errors 2021-01-24 13:17:11 +11:00
Geoffrey McRae
88b15cb3fe [client] egl: nit, fix case of function name 2021-01-24 12:18:56 +11:00
Geoffrey McRae
6990d7f7e3 [client] egl: commit missed files for the last changeset 2021-01-24 12:16:39 +11:00
Geoffrey McRae
9941a4bb83 [client] egl: runtime detect support for glEGLImageTargetTexture2DOES 2021-01-24 12:06:10 +11:00
Quantum
d610aaf2cf [host] nvfbc: update cursor position on shape change
This is because we keep track of the top-left corner of the cursor, not
the location of the hotspot. When the cursor shape changes, the hotspot
location may also change. When it does, the position of the top-left
corner changes and requires an update.

In the case that we do not have the current cursor position, which
happens on startup, we do not generate this update.
2021-01-23 20:37:09 +11:00
Quantum
908aa84599 [client] wayland: use acceleration in capture mode unless rawMouse
We are forced to use accelerated movement in regular mode as that is how the
host machine cursor moves and we want the cursors to line up (since Wayland
cannot do warps). To avoid a change in sensitivity when toggling capture
mode on/off, we should use accelerated deltas for capture mode as well,
unless the user explicitly asks for raw input with input:rawMouse.
2021-01-23 20:18:20 +11:00
Geoffrey McRae
185c7764ba [client] spice: always show the pointer if using input:captureOnly 2021-01-21 17:36:22 +11:00
Geoffrey McRae
4113294d30 [client] spice: fix failure to ungrab the kb with captureOnly 2021-01-21 17:32:44 +11:00
Geoffrey McRae
aa92a7a90d [client] app: fix error: ‘dataSize’ may be used uninitialized (take 2) 2021-01-21 17:25:53 +11:00
Geoffrey McRae
c83243f22c [client] app: fix error: ‘dataSize’ may be used uninitialized 2021-01-21 17:21:24 +11:00
Geoffrey McRae
04774d9cd6 [host] fix faults caused by improper startup/shudown/restart ordering 2021-01-21 17:05:30 +11:00
Geoffrey McRae
6b8161972d [host] nvfbc: prevent possible double free 2021-01-21 16:28:20 +11:00
Geoffrey McRae
9965a4a3a6 [host] app: prevent double call to stopThreads 2021-01-21 16:27:57 +11:00
Geoffrey McRae
98ea8b0bb8 [host] nvfbc: remove invalid close of the HMONITOR handle 2021-01-21 16:17:24 +11:00
Geoffrey McRae
23e883f60f Revert "[client] sdl: move SDL specific screensaver inhibit"
This reverts commit afb0146d33.
Additional handling is required to implement this properly, postpone
this for Beta 4
2021-01-21 15:58:37 +11:00
Geoffrey McRae
8778827a42 [host] fix invalid LGMP free of cursor memory 2021-01-21 15:53:06 +11:00
Geoffrey McRae
536df254e0 [host] fix the return code for the platform specific init 2021-01-21 15:44:19 +11:00
Geoffrey McRae
dcd0cb7d8e [client] spice: release the mouse if the host stops 2021-01-21 15:39:15 +11:00
Geoffrey McRae
ef4df571f0 [host] use posix compatible exit codes (signed char) 2021-01-21 15:24:02 +11:00
Geoffrey McRae
e926bad759 [host] dont overwrite the exit code on shutdown 2021-01-21 15:14:50 +11:00
Geoffrey McRae
ad9e84eaaa [host] return a proper exit code 2021-01-21 15:07:19 +11:00
Geoffrey McRae
29ea8ecf6b [client] app: if spice is not in use, hide the local cursor (fixes #415) 2021-01-21 14:17:31 +11:00
Geoffrey McRae
afb0146d33 [client] sdl: move SDL specific screensaver inhibit out of main.c 2021-01-21 14:03:05 +11:00
Quantum
3385438095 [client] wm: use correct logic for screensaver inhibition
Namely, we should inhibitIdle if noScreensaver is true, not the other way
around.
2021-01-21 12:14:38 +11:00
Quantum
ffa72c7992 [host] nvfbc: force composition to capture some full screen apps
NvFBC is unable to capture certain applications that bypasses the DWM
compositor, for example, Firefox playing video in full screen. This
has been a known issue for a long time with Nvidia's ShadowPlay, see:
* https://www.nvidia.com/en-us/geforce/forums/geforce-experience/14/233709/
* https://crbug.com/609857

Nvidia won't fix this, but there are workarounds. For example, we
create a transparent 1x1 layered window, which forces desktop composition
to be enabled.

Note that SetLayeredWindowAttributes also supports alpha-based transparency,
but setting transparency to 0 will cause DWM to skip composition. We could
use a transparency of 1, but this ruins the image by the slightest bit,
which is unacceptable. Therefore, we must use chroma key-based
transparency, which tricks DWM into compositing despite being fully
transparent.
2021-01-21 12:14:03 +11:00
Geoffrey McRae
428b498cca [common] fix invalid read from unaligned addresses (fixes #410) 2021-01-20 23:18:46 +11:00
Quantum
6077dcc123 [client] spice/wayland: fix jitter when moving the cursor slowly
It does not make sense to accumulate fractional error in non-capture mode
as you know exactly where the cursor is supposed to be, at least on Wayland.

On Wayland, we base movements on the current guest position and desired
target position, and the accumulated errors only skew our movements.
2021-01-20 22:54:08 +11:00
Geoffrey McRae
115c226113 [github] update build workflow to update apt, and update deps 2021-01-20 22:51:00 +11:00
Geoffrey McRae
e758f88519 [client] spice: fix failure to align and grab the pointer 2021-01-20 22:45:48 +11:00
Geoffrey McRae
3bccd9c45e [client] spice: input:captureOnly shouldn't capture the pointer at start 2021-01-20 22:16:03 +11:00
Geoffrey McRae
947ba9bfe3 [client] spice: fix input:captureOnly support 2021-01-20 22:12:39 +11:00
Geoffrey McRae
4ca4fd35ad [client] doc: added win:rotate and keybind to README.md 2021-01-20 15:37:23 +11:00
Geoffrey McRae
8fa2b5f368 [client] config: make the help text for winRotate more descriptive 2021-01-20 15:35:13 +11:00
Geoffrey McRae
8cb0cbb91d [client] doc: update README.md with new libraries and backend config 2021-01-20 15:33:56 +11:00
Geoffrey McRae
d6f39d66bf [client] x11: xi is now a required library for the x11 backend 2021-01-20 15:33:34 +11:00
Geoffrey McRae
ab79dae0b8 [client] cmake: fix typo in cmake configuration 2021-01-20 15:33:10 +11:00
Geoffrey McRae
ee8c883201 [client] x11: implement screensaver (un)inhibit 2021-01-20 15:24:10 +11:00
Geoffrey McRae
d1043e590a [client] x11: register for absolute motion events while grabbed 2021-01-20 05:51:18 +11:00
Geoffrey McRae
5789a7efc0 [client] x11: fix failure to process the correct focus events 2021-01-20 05:41:33 +11:00
Geoffrey McRae
f883c630f6 [client] spice: set inView false if the focus is lost
Failure to do this results in loss of input on X11 as we need to be sure
the cursor is ungrabbed.
2021-01-20 05:07:55 +11:00
Geoffrey McRae
ac3333c0d2 [client] x11: switch to using XInput2 for all events and warp
On platforms like KDE, mixing X core events with XInput2 events causes
issues, so just switch entirely over to XInput2.
2021-01-20 04:53:43 +11:00
Geoffrey McRae
da65c47245 [client] spice: fix transposed cursor scale calculations 2021-01-20 04:53:43 +11:00
Xiretza
31ea93dd0d [client] Fix compiler warnings about potentially uninitialized variables
Build failed with _FORTIFY_SOURCE enabled because the compiler couldn't
ensure the switch statements didn't hit the default arm and thus wouldn't
define the variables. Adding a statically failing assert makes sure that
all code paths either define the variables or fail early.

$ cd client
$ env CFLAGS='-O1 -D_FORTIFY_SOURCE=1' cmake -B build/
$ make -C build
[...]
client/renderers/EGL/egl.c: In function ‘egl_calc_mouse_size’:
client/renderers/EGL/egl.c:299:36: error: ‘h’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  299 |         (this->mouseHeight * (1.0f / h)) * this->scaleY
      |                              ~~~~~~^~~~
2021-01-20 03:05:30 +11:00
Geoffrey McRae
6d162cf92d [client] spice: remove useless check, the displayserver should do this 2021-01-20 01:34:52 +11:00
Geoffrey McRae
8f07744c98 [client] don't hide the cursor unconditionally at startup 2021-01-20 01:27:38 +11:00
Geoffrey McRae
dacc573650 [client] spice: align the guest pointer to local when entering the view 2021-01-20 01:24:31 +11:00
Geoffrey McRae
555891face [client] x11: filter out grab/ungrab focus/leave events 2021-01-20 01:21:19 +11:00
Geoffrey McRae
8e604667f9 [client] fix regression causing failure to warp when exiting the window 2021-01-20 00:52:33 +11:00