DxgkDdiSetPointerPosition not getting called in WDDM Miniport Driver

Hi all,

We are implementing hardware pointers for a WDDM display driver on Windows 7. In my DxgkDdiSetPointerShape function, I am making copies of the pointer structures and returning STATUS_SUCCESS. But after that I am not seeing calls to DxgkDdiSetPointerPosition. Is there something else I have to do other than return STATUS_SUCCESS in DxgkDdiSetPointerShape? Any ideas why Windows wouldn’t call my DxgkDdiSetPointerPosition function?

Thanks

Are you correctly advertising pointer properties in DxgkDdiQueryAdapterInfo?

Kris

On Tue, Sep 24, 2013 at 7:38 AM, wrote:
> Hi all,
>
> We are implementing hardware pointers for a WDDM display driver on Windows 7. In my DxgkDdiSetPointerShape function, I am making copies of the pointer structures and returning STATUS_SUCCESS. But after that I am not seeing calls to DxgkDdiSetPointerPosition. Is there something else I have to do other than return STATUS_SUCCESS in DxgkDdiSetPointerShape? Any ideas why Windows wouldn’t call my DxgkDdiSetPointerPosition function?
>
> Thanks
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Kris

Krzysztof, Thanks for reply.
Yes, I am doing it in DxgkDdiQueryAdapterInfo.
I set the pointer capabilities TRUE for both Mono and Color cursor.

For my driver I have Mono, color, and masked color all set to 1 plus
non-zero values for MaxPointerWidth and MaxPointerHeight. I can’t actually
support masked color so I reject the operation in SetPointerShape. I get
both shape and position callbacks. I think I remember having to set all the
capabilities to TRUE or I got nothing.

The user mode driver has to cooperate too.

Mark Roddy

On Tue, Sep 24, 2013 at 7:47 AM, wrote:

> Krzysztof, Thanks for reply.
> Yes, I am doing it in DxgkDdiQueryAdapterInfo.
> I set the pointer capabilities TRUE for both Mono and Color cursor.
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

Mark,

Thanks for the valuable info. I’ll try these and check what happens.
Will you be able to clarify these two:

  1. Up to now, I had been setting these values of Mono and Color to “1”. Do you say to do something like:
    pDriverCaps->PointerCaps.Monochrome = 1 + MaxPointerWidth + MaxPointerHeight;
    and so on…

  2. “The user mode driver has to cooperate too.”
    What extra functionality I need to add to the user mode driver?

Thanks!

On Wed, Sep 25, 2013 at 7:17 AM, wrote:
> 1) Up to now, I had been setting these values of Mono and Color to “1”. Do you say to do something like:
> pDriverCaps->PointerCaps.Monochrome = 1 + MaxPointerWidth + MaxPointerHeight;
> and so on…
No, he meant that MaxPointerWidth and MaxPointerHeigh need to be set
to non-zero values and Monochrome, Color and MaskedColor flags set.

> 2) “The user mode driver has to cooperate too.”
> What extra functionality I need to add to the user mode driver?
It’s been a while since I last dealt with full WDDM driver but I’m
pretty sure that I didn’t have to do anything special in UMD just to
get DxgkDdiSetPointerPosition called.

Kris

>
> Thanks!
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Kris

Kris,

Thanks a lot for the clarification. I am already setting these values…
Now the one thing I need to know is “What exactly is needed to be Added/Modified in the User-Mode Driver?”

Adding to it: I am getting the “pSetPointerPosition->Flags.Visible” 's value as zero. Can anyone guide me on how do i get a “visible” pointer??

Thanks!

On Thu, Sep 26, 2013 at 10:29 AM, wrote:

> SetPointerPosition

You should return STATUS_SUCCESS from SetPointerPosition regardless of the
visibility.

Mark Roddy

Hi Mark,

I am already returning STATUS_SUCCESS from SetPointerPosition. Now I have two queries:

  1. What else should be put in the BODY of SetPointerPosition??

  2. You mentioned “The user mode driver has to cooperate too.” How? What extra capabilities i need to add to the user mode driver?

Thanks!

  1. Nothing

  2. Not much to do in the User Mode Driver.
    Only 3D caps like e.g. DWORD D3DCAPS9::CursorCaps.
    Not even sure if this is really evaluated
    by Desktop Window Manager.

Suggestion:
Start on Win7 with “AERO Transparency Glass Look” switched off.
Then you don’t have to worry about the User Mode Driver.

Hint:
I can indeed see a lot of DxgkDdiSetPointerPosition with coordinates 0;0 and visibility set to false upon initial DWM startup after login on Windows 7 while “AERO Transparency Glass Look” switched on (never noticed before). Hope that this is not the source of confusion. Reasonable mouse movements with coordinates and visibility will follow later, after startup of DWM.

Marcel Ruedinger
datronicsoft

Yeah, I’m not sure if I ever touched CursorCaps either.

On win8 pointer usually gets invisible (in terms of visibility flag
being unset, but still visually visible) when moving windows - it was
for KMDOD driver though (but I’m pretty sure that it was pretty much
the same case with VBOX WDDM running on win8 as well), I don’t recall
seeing similar behavior on vista/win7.

Kris

On Fri, Sep 27, 2013 at 11:57 AM, wrote:
> 1) Nothing
>
> 2) Not much to do in the User Mode Driver.
> Only 3D caps like e.g. DWORD D3DCAPS9::CursorCaps.
> Not even sure if this is really evaluated
> by Desktop Window Manager.
>
> Suggestion:
> Start on Win7 with “AERO Transparency Glass Look” switched off.
> Then you don’t have to worry about the User Mode Driver.
>
> Hint:
> I can indeed see a lot of DxgkDdiSetPointerPosition with coordinates 0;0 and visibility set to false upon initial DWM startup after login on Windows 7 while “AERO Transparency Glass Look” switched on (never noticed before). Hope that this is not the source of confusion. Reasonable mouse movements with coordinates and visibility will follow later, after startup of DWM.
>
> Marcel Ruedinger
> datronicsoft
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Kris

Hardware pointer invisible while dragging windows on Windows 8?
Probably fixing the old problem of missing sync
between hardware cursor and screen update
which caused multiple mouse cursors and
dragging windows lagging behind the cursor,
especially on slower (e.g. network connected) displays.

Marcel Ruedinger
datronicsoft

Hi Marcel and Kris,
Thanks for responding.

One more observation I’d like to mention is: With the driver loaded, if i log off, i see a bunch of calls (5 to 7) to the SetPointerShape and a few calls to SetPointerPosition. However, once i log in, i don’t see any calls to the pointer functions. This all is with “Aero Disabled” so I don’t think it is a D3D driver issue.
Any ideas??

Thanks!