Skip to content

Couldn't retrieve Pointer info by entering PointerID #711

Closed

Description

I am trying to get mouse location by calling winrt.windows.ui.input, but specifying PointerID seems not working here:

import winrt.windows.ui.input as wi
wi.PointerPoint.get_current_point(1)

It throws

RuntimeError: Failed to get pointer information.

This shouldn't be the case, from the data I collected in a C# UWP test app:

image

Activity

  1. jonwis commented on Oct 9, 2020

    @jonwis
    Member

    Pointers and input are associated with windows and dispatcher loops. The identifiers are also not guaranteed to be stable across processes. Are you calling that get_current_point as part of handing WM_POINTER* messages or other input messages in a WndProc?

  2. BenJKuhn commented on Feb 20, 2021

    @BenJKuhn
    Contributor

    Python support for winrt defaults to running in MTA. This causes a number of issues related to using UI features that assume STA and UI thread context. Any work to address this would be in the context of broader support for UI (which would be amazing, but isn't currently scheduled).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions