[Spice-devel] [PATCH qxl-wddm-dod v2] Send HIDE command when pointer is not visible

Frediano Ziglio fziglio at redhat.com
Tue Nov 22 11:05:36 UTC 2016


From: Javier Celaya <javier.celaya at flexvdi.com>

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 at flexvdi.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
---
 qxldod/QxlDod.cpp | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Changes since v1:
- fix some type in commit message;
- added sign off;
- acked the patch.

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index 724e89f..8f31714 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -434,11 +434,6 @@ NTSTATUS QxlDod::SetPointerPosition(_In_ CONST DXGKARG_SETPOINTERPOSITION* pSetP
     QXL_ASSERT(pSetPointerPosition != NULL);
     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);
 }
 
@@ -4507,7 +4502,7 @@ NTSTATUS QxlDevice::SetPointerPosition(_In_ CONST DXGKARG_SETPOINTERPOSITION* pS
                                  pSetPointerPosition->X,
                                  pSetPointerPosition->Y));
     QXLCursorCmd *cursor_cmd = CursorCmd();
-    if (pSetPointerPosition->X < 0) {
+    if (pSetPointerPosition->X < 0 || !pSetPointerPosition->Flags.Visible) {
         cursor_cmd->type = QXL_CURSOR_HIDE;
     } else {
         cursor_cmd->type = QXL_CURSOR_MOVE;
-- 
2.7.4



More information about the Spice-devel mailing list