Skip to content

Changes to cursor position without mouse event #7581

Open
@anntzer

Description

@anntzer

This both affects the current tool system and the MEP22 toolmanager.

The cursor position only gets updated when the canvas detects a cursor motion, which leads to problems 1) immediately after switching fullscreen and 2) if alt-tab'ing to change window focus, moving the cursor and alt-tab'ing back to the original canvas. With either case, the x-y position printed in the status bar is incorrect and it is possible for keyboard shortcuts (e.g.) "g" or "l" to end up affecting a "wrong" axes.

There is a length comment regarding this in the tkagg backend implementation (_update_pointer_position) but even that backend doesn't handle this properly.

Ultimately I think(?) the correct way to solve this is to do away with _lastx/_lasty and just refetch the cursor position whenever a LocationEvent must be emitted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    MEP: MEP22tool managerkeepItems to be ignored by the “Stale” Github Action

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions