Cannot hide mouse cursor in Xbox One app targeting 10.0.14393.0



  • I have a simple app targeting UWP containing a WebView, that I'm testing on the Xbox One. One thing which is bothering me and which I cannot seem to get rid of is the mouse cursor. That means that users cannot use the gamepad to do directional navigation between UI elements. On a regular XAML app, you are supposed to disable mouse mode at startup by calling Application.Current.RequiresPointerMode = ApplicationRequiresPointerMode.WhenRequested, as detailed in https://blogs.windows.com/buildingapps/2016/09/09/tailoring-your-app-for-xbox-and-the-tv-app-dev-on-xbox-series/ (section 1. Optimize for the Gamepad) . Unfortunately Application.Current doesn't seem to be available on Qt apps (throws an exception with E_NOINTERFACE).

    Is this a known issue with Qt on the Xbox One with the Anniversary Update?

    P.S.: looking at the code for the AppContainer constructor, it seems an Application object is indeed created (but not saved), but for some reason it is not accessible through the Application.Current property.


  • administrators

    Hi @Besidge and welcome!

    This is a pretty hard one, as I'm not aware of many people working on XBone.
    So lets ping @mkalinow if he happens to read here occasionally.

    Otherwise I would ask this on the Qt Interest mailing list: http://lists.qt-project.org/mailman/listinfo/interest



  • I did a test subsequently, by copying the whole WinMain and AppContainer code to my project and tried to query the IApplication interface to an IApplication2 interface, and that still returned E_NOINTERFACE, so not really sure what could be done from the Qt side, other than instantiating the Application as a full-fledged XAML application.



  • @Besidge @mkalinow my contact at Microsoft looked at the code and doesn't understand why a XAML Application object is being created, instead of the lower level Windows::ApplicationModel::Core::IFrameworkView. Granted, neither him nor me are well-versed enough in Qt to understand why this decision was made. Using a XAML application will put the app automatically in mouse mode on the XB1, which is rarely wanted.



  • @Besidge, @mkalinow: I was able to reproduce this problem with a short sample project built from a VS template. The only way I was able to disable mouse mode (by accessing the RequiresPointerMode property) was to create a real ::Windows::UI::Xaml::Application-derived class, instead of resorting to Xaml::IApplicationFactory like Qt currently does. It seems that Xaml::IApplicationFactory creates an older style object which doesn't implement the IApplication2 interface.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.