Commit Graph

557 Commits

Author SHA1 Message Date
Quantum
df4a964496 [client] spice: stop if pointer left during guest warp
This prevents attempts to grab the pointer after the guest side warp
finishes if the pointer has left the window in the meantime. On Wayland,
this would result in the pointer moving to the middle of the window when
the confine is created.
2021-09-16 06:25:45 +10:00
Quantum
72f3a9f3cf [client] wayland: free presentation objects
Since the display server owns a graph, it was necessary to move the overlay
graphs destruction so that it happens after display server destruction.
2021-09-11 11:52:52 +10:00
Geoffrey McRae
3cefe9f9b5 [client] config: window width & height are unsigned values 2021-09-11 10:30:31 +10:00
Geoffrey McRae
e249106ddf [client] app: remove dead code 2021-09-11 10:22:44 +10:00
Quantum
ce091fd4e4 [client] main: correctly handle EINTR from nanosleep
Previously, all progress made during sleep is reset, so if the thread keeps
getting interrupted before the sleep finishes, the sleep will never complete.
2021-09-04 13:31:30 +10:00
Quantum
f287b4625d [client] config: fix usage of "ie" 2021-09-04 13:28:34 +10:00
Quantum
92155de98d [client] config: fix spelling of synchronize 2021-09-04 13:28:15 +10:00
Quantum
c7666b065a [client] main: print out CPU information on startup 2021-08-31 20:14:10 +10:00
Quantum
79a9127c04 [client] imgui: use consistent modal background colours
The translucent white modal background sort of cancels out the dark
background we apply to the overlay, which is undesirable. It should
instead further darken the background.

For consistency, we now use igGetColorU32Col(ImGuiCol_ModalWindowDimBg)
to draw the overlay background, to avoid hardcoding the same colour in
multiple places.
2021-08-31 09:09:26 +10:00
Quantum
31249da533 [client] imgui: run animations at consistent speeds
Currently, this is visible through how fast the cursor blinks, with it
blinking faster at higher refresh rates. This commit makes the timing
consistent.
2021-08-31 08:16:07 +10:00
Quantum
9bd205a527 [client] imgui: fix modifier key modification race
imgui really hates it when we update the modifier key state after igNewFrame.
The result is:

    void ImGui::ErrorCheckEndFrameSanityChecks(): Assertion
    `(key_mod_flags == 0 || g.IO.KeyMods == key_mod_flags) &&
    "Mismatching io.KeyCtrl/io.KeyShift/io.KeyAlt/io.KeySuper vs io.KeyMods"'
    failed.

Therefore, we buffer the modifier state information and update it in the IO
object right before we call igNewFrame.
2021-08-20 13:21:50 +10:00
Quantum
c0fa6c414c [client] spice: do not warp host cursor if guest cursor is not visible
This avoids warping the host cursor when the guest-side warp has not finished,
which will result in the host cursor exiting at the wrong position if it exits
at that moment.
2021-08-20 13:21:26 +10:00
Quantum
11a661ce3a [client] spice: don't display mouse before realignment finishes
This avoids showing the mouse briefly at the old position when reentering
the window.
2021-08-20 13:21:26 +10:00
Geoffrey McRae
c246b4a719 Revert "[client] core: realign in the enter/focus handlers if possible"
This reverts commit 17617cc421.
2021-08-19 23:19:59 +10:00
Geoffrey McRae
17617cc421 [client] core: realign in the enter/focus handlers if possible 2021-08-19 22:57:03 +10:00
Geoffrey McRae
e1a4401ffa [client] core: wait for the host to process the cursor move 2021-08-19 22:17:22 +10:00
Geoffrey McRae
3c3c0f70be [all] bump the LGMP version to obtain access to data serial tracking 2021-08-19 21:29:03 +10:00
Quantum
429620c48b [client] egl: dynamically import glBufferStorageEXT
On some implementations (e.g. llvmpipe), the function can only be queried via
eglGetProcAddress.
2021-08-19 21:28:45 +10:00
Quantum
1c7d14169e [client] kb: rename key code arrays from xfree86_* to linux_*
We are using Linux key codes defined in input-event-codes.h, not XFree86
stuff.
2021-08-17 19:08:07 +10:00
Quantum
81c38e825c [client] remove all casts around malloc
The cast is unnecessary in C and should be removed to avoid clutter.
2021-08-16 16:26:58 +10:00
Quantum
8a5efef622 [client] spice: avoid spice_key_modifiers when input is disabled 2021-08-16 16:25:11 +10:00
Tudor Brindus
14ad83c6b8 [client] use variable-relative sizeof where possible 2021-08-16 16:22:55 +10:00
Quantum
3a00277e93 [client] spice: add ability to set keyboard LED state in guest
FIXME: update PureSpice
2021-08-15 09:46:31 +10:00
Quantum
9414449408 [client] app: add ability to receive keyboard typing in overlays 2021-08-14 14:44:26 +10:00
Quantum
5f3bd778c0 [client] egl: add debug prints for renderStartup errors 2021-08-14 12:20:12 +10:00
Quantum
16adbab5d4 [client] all: remove needless initalization 2021-08-14 12:19:07 +10:00
Quantum
579f998519 [client] all: replace assert with DEBUG_ASSERT 2021-08-14 12:19:07 +10:00
Quantum
85a96d1e06 [client] all: use DEBUG_UNREACHABLE instead of assert
Due to the way assert is defined in standard C, compilers in release mode
will not treat it as unreachable. This explains a lot about those pesky
uninitialized variable bugs, actually.
2021-08-14 12:19:07 +10:00
Quantum
a76b274e1a [client] main: use ARRAY_LENGTH macro 2021-08-13 20:24:01 +10:00
Geoffrey McRae
35bd641d2a [client] overlay: remove the unused menu bar 2021-08-12 15:54:16 +10:00
Geoffrey McRae
6387bf2d2e [client] rework the configuration overlay to allow for tabs 2021-08-12 09:04:45 +10:00
Quantum
7e982a6658 [client] util: replace util_mergeOverlappingRects with common version 2021-08-11 19:01:52 +10:00
Geoffrey McRae
4f1136d0cd [client] core: dont warp the cursor if the overlay is active 2021-08-10 16:08:13 +10:00
Geoffrey McRae
f2b8ff9e8d [client] app: make overlay mode more transparent 2021-08-10 01:15:31 +10:00
Geoffrey McRae
69f6532b8d [common] ringbuffer: allow reverse iteration 2021-08-09 14:06:32 +10:00
Geoffrey McRae
f4a925a750 [client] main: destroy and finish fontconfig usage
Fixes ASAN reported memory leak
2021-08-08 16:21:48 +10:00
Geoffrey McRae
30ed563504 [client] interface: refactor to use camlCase function names 2021-08-08 15:43:42 +10:00
Geoffrey McRae
f8ae291090 [client] interface: switch to using UPCAST for the renderer's data 2021-08-08 15:32:01 +10:00
Geoffrey McRae
45d1f27fb4 [client] interface: rename LG_Renderer to LG_RendererOps
Part of the standardisation of using the `Ops` suffix for all interfaces
2021-08-08 14:43:04 +10:00
Geoffrey McRae
16f68d6b1b [client] main: don't call stopWaitFrame if jitRender is not enabled 2021-08-08 09:01:48 +10:00
Geoffrey McRae
162b1b93db [client] main: don't include the swap into the render timings
If vsync is enabled the swap will block until vblank skewing the timing
metrics.
2021-08-07 01:45:42 +10:00
Geoffrey McRae
0ec66ba210 [client] main: increase render graph max scale to 10ms
Some GPUs (like my K1200) easly exceed 2ms on the render time making
this graph useless.
2021-08-07 01:45:42 +10:00
Quantum
5b26017a8a [client] overlay: move separator above donation prompt
It looks really weird having a separator right after a sentence ending in :.
A separator makes the list look detached from the paragraph that introduces
it, which looks awkward. Instead, this commit moves the separator before the
introducing paragraph.

Also added logic to properly pluralize the sentence.
2021-08-06 22:49:02 +10:00
Quantum
6bd454f77f [client] overlay/config: switch to use new URL widget when possible 2021-08-05 22:43:46 +10:00
Quantum
08f3ad504c [client] imgui: implement new widget for displaying URLs
Note that actually opening the browser is not implemented yet.
2021-08-05 22:43:46 +10:00
Geoffrey McRae
afbee641b1 [client] implement support for KVMFR_FEATURE_SETCURSORPOS 2021-08-05 22:19:35 +10:00
Geoffrey McRae
719fec0a45 [client] don't terminate after successful upgrade of LGMP 2021-08-05 21:45:50 +10:00
Geoffrey McRae
2fa09dbd95 [client] allow the user to upgrade if the LGMP version doesn't match 2021-08-05 21:43:49 +10:00
Geoffrey McRae
a37b527bbd [client] main: make core overlays register before everything else
The display servers and renderers may want to register their own
overlays in the future, as such we need g_state.overlays to be
initialized to allow for this.
2021-08-05 07:01:28 +10:00
Geoffrey McRae
44f815409d [client] imgui: ensure the pointer shape is correct
Since we only update imgui's cursor location when the overlay is
enabled, if the last cursor position was showing a shape that is
incorrect when we re-enter the overlay the cursor will be wrong. This
corrects this by updating the location as we enter overlay mode.
2021-08-05 06:55:41 +10:00