Send HIDE command when pointer is not visible

This avoids having 2 pointers (client and server) if Windows decides
to render the mouse by itself. This happens, for instance, when moving
windows around.

Signed-off-by: Javier Celaya <javier.celaya@flexvdi.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Javier Celaya 2016-02-10 11:45:14 +01:00 committed by Frediano Ziglio
parent da0680c8d5
commit 0ee4b29ea5

View File

@ -434,11 +434,6 @@ NTSTATUS QxlDod::SetPointerPosition(_In_ CONST DXGKARG_SETPOINTERPOSITION* pSetP
QXL_ASSERT(pSetPointerPosition != NULL); QXL_ASSERT(pSetPointerPosition != NULL);
QXL_ASSERT(pSetPointerPosition->VidPnSourceId < MAX_VIEWS); QXL_ASSERT(pSetPointerPosition->VidPnSourceId < MAX_VIEWS);
if (!(pSetPointerPosition->Flags.Visible))
{
DbgPrint(TRACE_LEVEL_INFORMATION, ("<--- %s Cursor is not visible\n", __FUNCTION__));
return STATUS_SUCCESS;
}
return m_pHWDevice->SetPointerPosition(pSetPointerPosition); return m_pHWDevice->SetPointerPosition(pSetPointerPosition);
} }
@ -4507,7 +4502,7 @@ NTSTATUS QxlDevice::SetPointerPosition(_In_ CONST DXGKARG_SETPOINTERPOSITION* pS
pSetPointerPosition->X, pSetPointerPosition->X,
pSetPointerPosition->Y)); pSetPointerPosition->Y));
QXLCursorCmd *cursor_cmd = CursorCmd(); QXLCursorCmd *cursor_cmd = CursorCmd();
if (pSetPointerPosition->X < 0) { if (pSetPointerPosition->X < 0 || !pSetPointerPosition->Flags.Visible) {
cursor_cmd->type = QXL_CURSOR_HIDE; cursor_cmd->type = QXL_CURSOR_HIDE;
} else { } else {
cursor_cmd->type = QXL_CURSOR_MOVE; cursor_cmd->type = QXL_CURSOR_MOVE;