none
Why dose mouse cursor disappear after touch events ?

    Question

  • We have a case where mouse cursor disappears after touching windows desktop icons behind our application window.

    Our application window is:

    Background="Transparent"
    AllowsTransparency="True"
    WindowState="Maximized" 
    WindowStyle="None"

    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 ?


    hopewise

    Tuesday, October 30, 2012 10:12 AM

All replies

  • Hi hopewise,

    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.

    Jon

    Thursday, November 01, 2012 5:22 PM
  • >How does the user touch desktop icons if they are behind your application window?

    Its our main window properties:
    Background="Transparent"

    AllowsTransparency="True"

    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: 

    https://skydrive.live.com/#cid=2813019DB0AE186A&id=2813019DB0AE186A%21129

    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!

    Thanks,
    Samir


    hopewise

    Sunday, November 04, 2012 1:38 PM
  • Hi hopewise,

    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.

    Jon

    Tuesday, November 06, 2012 8:28 PM
  • Thanks Jon, we tried to remove the whole low level mouse hook, but, the problem was still there .. so, the conditional statement for CallNextHookEx is not effecting the mouse disappearance ..

    hopewise

    Wednesday, November 07, 2012 6:17 AM
  • Hi hopewise,

    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.

    Thank you.

    Jon

    Thursday, November 08, 2012 8:57 PM
  • Thanks Jon, can you please tell me, what the steps to create an incident with support ?

    As long as its out of t his post scope, I will need a help, as I don't know other place to ask for support else this post :-)

    Regards,
    hopewise


    hopewise

    Sunday, November 11, 2012 6:26 AM