We have a case where mouse cursor disappears after touching windows desktop icons behind our application window.
Our application window is:
The scenario of the disappeared mouse cursor is persistent, its whenever user touches desktop icons. Our application window allows events through it to pass behind.
How can we debug such a problem ? is there any known reason that causes this undesired behavior for mouse ?
I am not aware of any behavior such as what you described, but may be confused about it though. How does the user touch desktop icons if they are behind your application window? Does the mouse reappear if the user moves it subsequently? What OS are you using also? Is this problem observed on Windows 7? Windows 8? Both? Are you handling these touch events in your application, and if so, what code are you executing when they occur? Or is this rather purely the Windows behavior whenever a user touches a desktop icon, regardless of what application windows are displayed?
If you have a small sample that demonstrates the problem, and can upload this to SkyDrive or another location, that may help me experiment with it further too, and I will see if I can figure out what is going on. Or it may be with more details I will be able to find the answer for you.
>How does the user touch desktop icons if they are behind your application window?
Its our main window properties:
with such values, events will pass through our application to desktop or what ever behind.
>Does the mouse reappear if the user moves it subsequently?
Only hover effects appear, but the mouse cursor it self is invisible.
>What OS are you using also? Is this problem observed on Windows 7? Windows 8? Both?
We only tested it with Windows 7 OS.
>Are you handling these touch events in your application
No, those touch events who passed behind our app are not handled, unless user touches over any control inside the main window, events will pass.
>Or is this rather purely the Windows behavior whenever a user touches a desktop icon, regardless of >what application windows are displayed?
No, the problem related to our application only.>If you have a small sample that demonstrates the problem ...
Ok, You can find the sample in which you can see the problem at:
To produce the bug:
1. Click the "Start Mouse API Hook(Problem)" button.
2. Touch the desktop icons with your touch screen.
3. Move the mouse, no mouse cursor appears!
4. Click "Stop Mouse API Hook", you will see the mouse cursor appear again.
Why we needed the Mouse API hook in the first place ? because we need to listen for mouse down when its out of our application, its something related to our software business.
If there is an alternative, or if you can fix the sample above, it will be a great support!
Thank you for providing this. It looks like there is a conditional statement that decides whether CallNextHookEx is called. Have you tried calling this always without a conditional? This could explain why the mouse disappears, although I wasn't able to test it yet myself.
In this case, it sounds like the problem will manifest directly with any touch event occurring behind a WPF window that allows transparency such that the touched area is not actually part of the window. I could not find any known existing issues where this problem was reported, so it will require some further investigation by the support team beyond what we can provide in a forum post. Please create an incident with support and we will follow up to dig into this further then.