mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[client] spice/wayland: use correct coordinate space
This will now correctly respect the cursor hotspot.
This commit is contained in:
parent
ab96f77d9e
commit
95205ca967
@ -920,8 +920,12 @@ static void guestCurToLocal(struct DoublePoint *local)
|
|||||||
// capture mode.
|
// capture mode.
|
||||||
static void handleMouseWayland()
|
static void handleMouseWayland()
|
||||||
{
|
{
|
||||||
double ex = (g_cursor.pos.x - g_cursor.guest.x) / g_cursor.dpiScale;
|
/* translate the guests position to our coordinate space */
|
||||||
double ey = (g_cursor.pos.y - g_cursor.guest.y) / g_cursor.dpiScale;
|
struct DoublePoint local;
|
||||||
|
guestCurToLocal(&local);
|
||||||
|
|
||||||
|
double ex = (g_cursor.pos.x - local.x) / g_cursor.dpiScale;
|
||||||
|
double ey = (g_cursor.pos.y - local.y) / g_cursor.dpiScale;
|
||||||
|
|
||||||
int x, y;
|
int x, y;
|
||||||
cursorToInt(ex, ey, &x, &y);
|
cursorToInt(ex, ey, &x, &y);
|
||||||
|
Loading…
Reference in New Issue
Block a user