mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-14 21:17:54 +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
1 changed files with 6 additions and 2 deletions
|
@ -920,8 +920,12 @@ static void guestCurToLocal(struct DoublePoint *local)
|
|||
// capture mode.
|
||||
static void handleMouseWayland()
|
||||
{
|
||||
double ex = (g_cursor.pos.x - g_cursor.guest.x) / g_cursor.dpiScale;
|
||||
double ey = (g_cursor.pos.y - g_cursor.guest.y) / g_cursor.dpiScale;
|
||||
/* translate the guests position to our coordinate space */
|
||||
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;
|
||||
cursorToInt(ex, ey, &x, &y);
|
||||
|
|
Loading…
Reference in a new issue