WinUI-Gallery
                                
                                 WinUI-Gallery copied to clipboard
                                
                                    WinUI-Gallery copied to clipboard
                            
                            
                            
                        Wrong mouse cursor on startup
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
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.
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?
Sorry for the delay, unfortunately I cannot move this issue @LucaCris. I was able to reproduce this issue now on Windows 11.
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 I can't keyboard focus anything in my App first launch page... 😑
@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);
}
I'm definitely still seeing this issue on my WinUI 3 application. Not critical certainly, but annoying.
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.