WinUI-Gallery icon indicating copy to clipboard operation
WinUI-Gallery copied to clipboard

Wrong mouse cursor on startup

Open LucaCris opened this issue 3 years ago • 2 comments

Describe the bug

Mouse cursor is in wait mode until mouse is moved.

Steps to reproduce the bug

Steps to reproduce the behavior:

Launch WinUI 3 Gallery app, without using/moving mouse, and with mouse pointer above predicted window placement. It happens with others WinUI3 apps.

Expected behavior

Arrow as mouse pointer.

Actual behavior

Wait cursor as mouse pointer.

Version Info

Latest, SDK 1.1 (and also with SDK 1.0.x).

WinUI version:

  • [X] WinUI3 / WinAppSDK 1.1
  • [X] WinUI3 / WinAppSDK 1.0
  • [ ] WinUI2

Windows 11 version:

  • [ ] Insider Build (xxxxx)
  • [ ] Windows 11 22H2 (22621)
  • [X] Windows 11 21H2 (22000)

Windows 10 version:

  • [ ] November 2021 Update/21H2 (19044)
  • [ ] May 2021 Update/21H1 (19043)
  • [ ] October 2020 Update/20H2 (19042)
  • [ ] October 2018 Update/RS5 (17763)

Device form factor:

  • [X] Desktop
  • [ ] Mobile
  • [ ] Xbox
  • [ ] Surface Hub
  • [ ] IoT

LucaCris avatar Jun 15 '22 14:06 LucaCris

This sounds more like a WinUI 3 issue than a WinUI 3 Gallery issue, what do you think @gregwoo-microsoft and @bpulliam ?

Btw, I wasn't able to repro this on Win10, while there is a wait cursor it disappears after half a second.

marcelwgn avatar Jun 15 '22 19:06 marcelwgn

This sounds more like a WinUI 3 issue than a WinUI 3 Gallery issue

Oh, sure. Also my WinUI 3 App has the same issue... Wrong place for the bug submit? Can you move it?

LucaCris avatar Jun 16 '22 17:06 LucaCris

Sorry for the delay, unfortunately I cannot move this issue @LucaCris. I was able to reproduce this issue now on Windows 11.

marcelwgn avatar Oct 01 '22 05:10 marcelwgn

As a workaround, you can set the focus on the AutoSuggestBox.

private void OnNavigationViewControlLoaded(object sender, RoutedEventArgs e)
{
    // Delay necessary to ensure NavigationView visual state can match navigation
    Task.Delay(500).ContinueWith(_ => this.NavigationViewLoaded?.Invoke(), TaskScheduler.FromCurrentSynchronizationContext());

    // Set focus just as a workaround for the "waiting mode cursor" at startup.
    this.controlsSearchBox.Focus(FocusState.Keyboard);
}

AndrewKeepCoding avatar Oct 12 '22 12:10 AndrewKeepCoding

@AndrewKeepCoding I can't keyboard focus anything in my App first launch page... 😑

LucaCris avatar Oct 13 '22 12:10 LucaCris

@LucaCris The code is just a workaround that works with the WinUI 3 Gallery app, hoping the gives you one way to fix the issue in your app. By the way, this also works with the WinUI 3 Gallery app.

private void OnNavigationViewControlLoaded(object sender, RoutedEventArgs e)
{
    // Delay necessary to ensure NavigationView visual state can match navigation
    Task.Delay(500).ContinueWith(_ => this.NavigationViewLoaded?.Invoke(), TaskScheduler.FromCurrentSynchronizationContext());

    // Set focus just to workaround the "waiting mode cursor" at startup.
    //this.controlsSearchBox.Focus(FocusState.Keyboard);
    this.rootFrame.Focus(FocusState.Pointer);
}

AndrewKeepCoding avatar Oct 13 '22 13:10 AndrewKeepCoding

I'm definitely still seeing this issue on my WinUI 3 application. Not critical certainly, but annoying.

gwalschlager avatar Feb 09 '23 13:02 gwalschlager

Closing issue - this is caused by https://github.com/microsoft/microsoft-ui-xaml/issues/8689, which we have a fix for in the WASDK 1.5 timeframe.

gegao18 avatar Nov 28 '23 23:11 gegao18