mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[client] spice/wayland: fix capture mode relative movement
It appears that Wayland pointer motion handlers are called even when relative mouse mode is enabled. The events they generate break first-person games. This commit disables those handlers when relative mouse is enabled.
This commit is contained in:
parent
3935acf8a5
commit
ff1dc32efe
@ -123,6 +123,9 @@ static const struct wl_registry_listener registryListener = {
|
||||
static void pointerMotionHandler(void * data, struct wl_pointer * pointer,
|
||||
uint32_t serial, wl_fixed_t sxW, wl_fixed_t syW)
|
||||
{
|
||||
if (wm.relativePointer)
|
||||
return;
|
||||
|
||||
int sx = wl_fixed_to_int(sxW);
|
||||
int sy = wl_fixed_to_int(syW);
|
||||
app_updateCursorPos(sx, sy);
|
||||
@ -133,6 +136,9 @@ static void pointerEnterHandler(void * data, struct wl_pointer * pointer,
|
||||
uint32_t serial, struct wl_surface * surface, wl_fixed_t sxW,
|
||||
wl_fixed_t syW)
|
||||
{
|
||||
if (wm.relativePointer)
|
||||
return;
|
||||
|
||||
int sx = wl_fixed_to_int(sxW);
|
||||
int sy = wl_fixed_to_int(syW);
|
||||
app_updateCursorPos(sx, sy);
|
||||
|
Loading…
Reference in New Issue
Block a user