[idd] the cursor pos is only valid if it's visible

This commit is contained in:
Geoffrey McRae 2023-04-14 21:40:21 +10:00
parent bbd0c7a99b
commit 9759b5aa8f

View File

@ -468,14 +468,16 @@ void CIndirectDeviceContext::SendCursor(const IDARG_OUT_QUERY_HWCURSOR& info, co
KVMFRCursor * cursor = (KVMFRCursor *)lgmpHostMemPtr(mem);
m_cursorVisible = info.IsCursorVisible;
uint32_t flags = 0;
if (info.IsCursorVisible)
{
m_cursorX = info.X;
m_cursorY = info.Y;
cursor->x = (int16_t)info.X;
cursor->y = (int16_t)info.Y;
uint32_t flags = CURSOR_FLAG_POSITION |
(info.IsCursorVisible ? CURSOR_FLAG_VISIBLE : 0);
flags |= CURSOR_FLAG_POSITION | CURSOR_FLAG_VISIBLE;
}
if (info.CursorShapeInfo.CursorType != IDDCX_CURSOR_SHAPE_TYPE_UNINITIALIZED)
{