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

Frediano Ziglio fziglio at redhat.com
Mon Nov 21 13:22:50 UTC 2016


Did some tests. 
Windows already does all optimization so when the pointer is not visible it does not call SetPointerPosition. 
Beside that it would have been an improvement while this patch is fixing a problem. 

So I would ack and merge both patches (Yuri one + Javier one). 

Frediano 

----- Original Message -----

> From: "Javier Celaya" <javier.celaya at flexvdi.com>
> To: "Yuri Benditovich" <yuri.benditovich at daynix.com>, "Frediano Ziglio"
> <fziglio at redhat.com>, "Dmitry Fleytman" <dmitry at daynix.com>
> Cc: spice-devel at lists.freedesktop.org
> Sent: Monday, November 21, 2016 7:46:55 AM
> Subject: Re: [Spice-devel] [PATCH qxl-wddm-dod] Send HIDE command when
> pointer is not visible

> 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.

> El dom, 20-11-2016 a las 16:18 +0200, Yuri Benditovich escribió:

> > Is this a best idea to send down HIDE command on each SetPointerPosition?
> 
> > I'd like to check it - may be we can filter it better on SetPointerShape?
> 

> > On Fri, Nov 18, 2016 at 7:07 PM, Frediano Ziglio < fziglio at redhat.com >
> > wrote:
> 

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

> > > This avoid having possibly 2 pointers (client and server) if Windows
> > 
> 
> > > decide to render the mouse by itself.
> > 
> 
> > > This happens for instance moving windows.
> > 
> 

> > > ---
> > 
> 
> > > qxldod/QxlDod.cpp | 7 +------
> > 
> 
> > > 1 file changed, 1 insertion(+), 6 deletions(-)
> > 
> 

> > > Javier, as we changed license since you create it could you please sign
> > > off
> > 
> 
> > > the patch?
> > 
> 

> > > I added some comments to this 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
> > 
> 

> > > _______________________________________________
> > 
> 
> > > Spice-devel mailing list
> > 
> 
> > > Spice-devel at lists.freedesktop.org
> > 
> 
> > > https://lists.freedesktop.org/mailman/listinfo/spice-devel
> > 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20161121/8b8d2a8a/attachment.html>


More information about the Spice-devel mailing list