Commit Graph

171 Commits

Author SHA1 Message Date
Geoffrey McRae
25d370ef22 [client] move new scaling variables into the CursorState struct 2021-01-05 09:48:30 +11:00
Geoffrey McRae
6c12990d26 [client] print out the client version too when there is a mismatch 2021-01-05 09:18:40 +11:00
Geoffrey McRae
12c83e82bb [client] if the host version doesn't match wait for it to be upgraded
This change allows one to upgrade the host application using the LG
spice client instead of immediately terminating
2021-01-05 09:13:54 +11:00
Quantum
a172d79f66 spice: scale mouse input based on host DPI information 2021-01-05 09:03:29 +11:00
Geoffrey McRae
523accf348 [client] spice: don't rely on the cursor position when it's not visible
DXGI DesktopDuplication does not send cursor positional updates when the
cursor is hidden, this happens when dragging a window around or when a
full screen application takes/hides the cursor. If this happened at the
same time as a resolution switch we don't know where the cursor really
is anymore.
2021-01-04 19:34:10 +11:00
Geoffrey McRae
53ae0ea9f1 [client] always update positional information when new format 2021-01-04 19:16:49 +11:00
Geoffrey McRae
8fd08cdd79 [client] spice: add option to ignore the windows key
If active this will prevent the client from sending keyboard events for
the windows key. The idea is to allow people to keep the windows key
bound to their WMs default action without causing the Windows start menu
to open
2021-01-04 18:22:39 +11:00
Geoffrey McRae
33b117e732 [client] spice: add new keybinds <ScrLck>+<LWin>, <ScrLck>+<RWin> 2021-01-04 18:07:09 +11:00
Geoffrey McRae
d775ed1ddb [client] cosmetics 2021-01-04 15:52:10 +11:00
Tudor Brindus
d997f0d18c [client] spice: properly handle high-precision scroll wheel input
Some setups (e.g. Wayland) have high precision scroll wheel input, such
that the y-delta on an event may exceed 1. In these cases, scrolling up
currently gets treated as scrolling down.

This commit changes the checks to use > 0 rather than == 1.

This is the approach suggested in
https://wiki.libsdl.org/SDL_MouseWheelEvent.
2021-01-04 15:51:52 +11:00
Geoffrey McRae
3b0a98ede2 [client] spice: use xlib directly for warping
This change allows us to look for and filter out the warp completion
event as we can obtain and use the serial number of the warp request to
do so. This is far more elegant then the x/y match that we were doing
prior.
2021-01-04 15:40:23 +11:00
Geoffrey McRae
5d5b7b3d3c [client] spice: just minor refactoring and commenting of code 2021-01-04 15:40:02 +11:00
Tudor Brindus
012ac950ac [client] fix Wayland detection logic
$XDG_SESSION_TYPE is not guaranteed to be "wayland" when running on a
Wayland compositor. However, $WAYLAND_DISPLAY must always exist.
2021-01-04 14:43:21 +11:00
Geoffrey McRae
f7d4efe1c1 [client] spice: don't ignore all enter window events 2021-01-04 14:27:30 +11:00
Geoffrey McRae
1195a76368 [client] video: ensure that the renderer is always updated on resize 2021-01-04 13:40:03 +11:00
Geoffrey McRae
43e3999a95 [client] spice: also grab keyboard when in capture mode 2021-01-04 13:22:54 +11:00
Geoffrey McRae
bfc492421c [client] spice: use XGrabPointer when in grab mode
People using high DPI mice and mouse accleration require this otherwise
the mouse can escape the window before we can warp it back.
2021-01-04 13:18:02 +11:00
Geoffrey McRae
2bc767430c [client] spice: be more aggressive with window warp for high DPI mice 2021-01-04 12:59:14 +11:00
Geoffrey McRae
183d06f90c [client] spice: fix borderless due to another SDL bug
SDL2 reports the window position as 0x0 when in borderless mode until
the window is moved or resized.
2021-01-04 12:28:35 +11:00
Geoffrey McRae
f7d7fbdb73 [client] rename state to g_state 2021-01-04 12:06:54 +11:00
Geoffrey McRae
6878eee40a [client] refactor cursor variables into their own global struct 2021-01-04 12:04:43 +11:00
Geoffrey McRae
c08aa8ece7 [client] spice: correct enter/leave event handling 2021-01-03 23:05:35 +11:00
Geoffrey McRae
5323d9833a [client] spice: fix mouse warp on window focus 2021-01-03 22:59:23 +11:00
Geoffrey McRae
3b580af194 [client] spice: correct oob hotspot 2021-01-03 22:28:06 +11:00
Geoffrey McRae
29a6365107 [client] spice: correct rounding errors when reaching edges 2021-01-03 22:27:48 +11:00
Geoffrey McRae
9f495863cd [client] spice: take into account the render rect for the new x/y pos 2021-01-03 17:42:58 +11:00
Geoffrey McRae
cd06fc251f [client] spice: don't process cursor input when the local cursor is oob 2021-01-03 17:21:04 +11:00
Geoffrey McRae
029640f1b3 [client] spice: don't use SDLs capture mode under X11, we have our own 2021-01-03 16:31:10 +11:00
Geoffrey McRae
5064a4ecdd [client] spice: take the cursor hotspot into account 2021-01-03 15:53:20 +11:00
Geoffrey McRae
5802bfb5eb [client] spice: calculate the entry point delta correctly 2020-12-06 11:07:05 +11:00
Geoffrey McRae
d61d7699e5 [client] spice: stop the cursor skipping the letterboxing 2020-12-06 09:58:50 +11:00
Geoffrey McRae
80d911f040 [client] spice: fix mouse exiting when the window is letterboxed/padded 2020-12-04 20:04:06 +11:00
Geoffrey McRae
1a8dfe1cc0 [client] spice: only check for a valid position if needed 2020-12-04 17:36:08 +11:00
Geoffrey McRae
c0a3b85580 [client] spice: don't disable warp when the future cursor pos is invalid 2020-12-04 17:32:28 +11:00
Geoffrey McRae
265b4544ef [client] spice: adjust ordering to avoid dropping mouse input events 2020-12-04 01:40:29 +11:00
Geoffrey McRae
c5befbba0e [client] spice: don't scale mouse if it's 1:1 2020-12-04 00:50:27 +11:00
Geoffrey McRae
3df23d6b73 [client] reworked the mouse tracking logic 2020-12-04 00:32:28 +11:00
Geoffrey McRae
e57f084c93 [client] added streaming clipboard support for large transfers 2020-12-03 12:01:51 +11:00
Geoffrey McRae
301ba45f0f [client] don't grab keyboard if spice input is disabled 2020-12-01 10:03:20 +11:00
Geoffrey McRae
bbcaaccdcc [client] added new option input:grabKeyboardOnFocus 2020-11-29 07:12:19 +11:00
Geoffrey McRae
dea7177d29 [client] added support for spice side/extra buttons
Note, QEMU must have support for these new buttons for this to have any
effect.
2020-11-28 14:59:21 +11:00
Geoffrey McRae
58dd352def [client] set fullscreen after window creation to keep window dimensions 2020-11-28 10:19:17 +11:00
Geoffrey McRae
f36c674791 [client] always set the minimize on focus loss hint 2020-11-28 10:16:11 +11:00
Geoffrey McRae
4a823d0e4f [client] grab the keyboard when the window has focus 2020-11-28 10:06:06 +11:00
jonpas
db51acdd8a [client] add option to always show cursor 2020-11-16 06:48:57 +11:00
Geoffrey McRae
12da2fc0b7 [client] fixed incorrect warpState
Credit to @Adam in Discord VFIO #looking-glass
2020-11-09 22:24:40 +11:00
Geoffrey McRae
ed95f8863d [client] fix divide by zero fault with fpsMin disabled (set to 0) 2020-11-08 10:58:18 +11:00
Geoffrey McRae
0badf2a84c [all] move defines for LGMP_QUEUE_*_LEN into KVMFR.h 2020-10-30 18:48:41 +11:00
Geoffrey McRae
c8f740c34e [client] fix usage of uninitialized time variable 2020-10-30 02:36:45 +11:00
Geoffrey McRae
4f9544d61d [client] egl: added DMA texture support for direct upload
Note: This only works with the KVMFR kernel module in a VM->VM
configuration. If this causes issues it can be disabled with the new
option `app:allowDMA`
2020-10-30 02:36:45 +11:00