- Home /
Why is mouse cursor stuck when Xbox Live shell dialogues pop up?
When my game invokes the sign-in shell dialogue for Xbox Live (on Windows 10 Store platform), the mouse pointer (cursor) appears but does not move or accept clicks. I have to Alt-Tab (or press Windows Start button) to activate mouse input. It is as if my game is still eating the mouse input, or the popped-up window is not focused. What might I be doing to cause that? It occurs in both full screen and windowed mode.
I was previously using Cursor.lockState = CursorLockMode.Confined when in full screen mode, but I commented that out, and anyway it happens in windowed mode as well in which I was setting Cursor.lockState = CursorLockMode.None.
Answer by JohnnyWasabi · Oct 07, 2016 at 07:42 AM
I should have also mentioned that I'm using a custom Default Cursor in the game. I just tried not using a custom cursor (just the OS cursor instead), and that solves the problem. With the custom cursor I am also unable to move the cursor off the game screen/window, in addition to getting a frozen cursor when the Xbox Live shell windows pop up.
So I think the answer is going to be to restore the OS cursor--using a call I found in another thread: Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto) )--just before invoking the pop-up windows in question, then return to my custom cursor when the game resumes control.
I gave up on trying to switch back and forth right around the invocations of the pop-up windows. The cursor seems to need some time to make the switch (or it doesn't work, cursor stays frozen), and didn't want to rely on uncertain ti$$anonymous$$g or introduce unnecessary lags before the pop-ups.
Ins$$anonymous$$d, my final solution was to not use custom cursor at all on the main menu screen, since that is the only location where the pop-ups occur. That works just fine. I still use a custom cursor during gameplay, I just switch back and forth when going to and from the main menu screen.