You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In tk backend, don't try to update mouse position after resize.
The tk backend contains a length chunk of code to update the "last
cursor position" after a window resize (because a window resize changes
the position of the cursor relative to the window). This "last cursor
position" is only used to correctly set the x/y coordinates of key press
events (because backends don't have a way to query the cursor position
-- they just track mouse_move_events and use that to remember the "last
cursor position".
Remove that chunk of code:
- It is tk only, but should really be implemented in a cross-backend
manner if we really want it; right now no other backend has similar
functionality.
- It only matters if one triggers a resize via the keyboard and later
trigger a key_press_event/key_release_event without intervening mouse
move.
- There are other ways to "move the mouse" relative to the canvas
without triggering a mouse_move_event (e.g. switch the focus to
another window, move the mouse, and switch back the focus to the
canvas); really, the correct solution would be to have a way to ask
the backend what is the *current* cursor position and use that in
key_press_event.
0 commit comments