<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>Did some tests.<br></div><div>Windows already does all optimization so when the pointer is not visible it does not call SetPointerPosition.<br></div><div>Beside that it would have been an improvement while this patch is fixing a problem.<br></div><div><br></div><div>So I would ack and merge both patches (Yuri one + Javier one).<br></div><div><br></div><div>Frediano<br></div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Javier Celaya" <javier.celaya@flexvdi.com><br><b>To: </b>"Yuri Benditovich" <yuri.benditovich@daynix.com>, "Frediano Ziglio" <fziglio@redhat.com>, "Dmitry Fleytman" <dmitry@daynix.com><br><b>Cc: </b>spice-devel@lists.freedesktop.org<br><b>Sent: </b>Monday, November 21, 2016 7:46:55 AM<br><b>Subject: </b>Re: [Spice-devel] [PATCH qxl-wddm-dod] Send HIDE command when pointer is not visible<br><div><br></div><div>I'm pretty sure Windows won't call SetPointerShape when it hides the hardware pointer, so you have to catch it in SetPointerPosition. But yes, you probably could send the HIDE command just once.</div><div><br></div><div>El dom, 20-11-2016 a las 16:18 +0200, Yuri Benditovich escribió:</div><blockquote><div dir="ltr">Is this a best idea to send down HIDE command on each SetPointerPosition?<div>I'd like to check it - may be we can filter it better on SetPointerShape?</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 18, 2016 at 7:07 PM, Frediano Ziglio <span dir="ltr"><<a href="mailto:fziglio@redhat.com" target="_blank" data-mce-href="mailto:fziglio@redhat.com">fziglio@redhat.com</a>></span> wrote:<br><blockquote>From: Javier Celaya <<a href="mailto:javier.celaya@flexvdi.com" target="_blank" data-mce-href="mailto:javier.celaya@flexvdi.com">javier.celaya@flexvdi.com</a>><br> <br> This avoid having possibly 2 pointers (client and server) if Windows<br> decide to render the mouse by itself.<br> This happens for instance moving windows.<br> <br> ---<br>  qxldod/QxlDod.cpp | 7 +------<br>  1 file changed, 1 insertion(+), 6 deletions(-)<br> <br> Javier, as we changed license since you create it could you please sign off<br> the patch?<br> <br> I added some comments to this patch.<br> <br> diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp<br> index 724e89f..8f31714 100755<br> --- a/qxldod/QxlDod.cpp<br> +++ b/qxldod/QxlDod.cpp<br> @@ -434,11 +434,6 @@ NTSTATUS QxlDod::SetPointerPosition(_In_ CONST DXGKARG_SETPOINTERPOSITION* pSetP<br>      QXL_ASSERT(pSetPointerPosition != NULL);<br>      QXL_ASSERT(pSetPointerPosition->VidPnSourceId < MAX_VIEWS);<br> <br> -    if (!(pSetPointerPosition->Flags.Visible))<br> -    {<br> -        DbgPrint(TRACE_LEVEL_INFORMATION, ("<--- %s Cursor is not visible\n", __FUNCTION__));<br> -        return STATUS_SUCCESS;<br> -    }<br>      return m_pHWDevice->SetPointerPosition(pSetPointerPosition);<br>  }<br> <br> @@ -4507,7 +4502,7 @@ NTSTATUS QxlDevice::SetPointerPosition(_In_ CONST DXGKARG_SETPOINTERPOSITION* pS<br>                                   pSetPointerPosition->X,<br>                                   pSetPointerPosition->Y));<br>      QXLCursorCmd *cursor_cmd = CursorCmd();<br> -    if (pSetPointerPosition->X < 0) {<br> +    if (pSetPointerPosition->X < 0 || !pSetPointerPosition->Flags.Visible) {<br>          cursor_cmd->type = QXL_CURSOR_HIDE;<br>      } else {<br>          cursor_cmd->type = QXL_CURSOR_MOVE;<br> <span class="HOEnZb"><span data-mce-style="color: #888888;" style="color: #888888;">--<br> 2.7.4<br> <br> _______________________________________________<br> Spice-devel mailing list<br> <a href="mailto:Spice-devel@lists.freedesktop.org" target="_blank" data-mce-href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br> <a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel" rel="noreferrer" target="_blank" data-mce-href="https://lists.freedesktop.org/mailman/listinfo/spice-devel">https://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br> </span></span><br></blockquote></div><br></div></blockquote><div><br></div></blockquote><div><br></div></div></body></html>