Cursor flashing with Tkinter and Pygame integrated in one window Cursor flashing with Tkinter and Pygame integrated in one window tkinter tkinter

Cursor flashing with Tkinter and Pygame integrated in one window


It appears to be tkinter and pygame 'fighting' over who shows the cursor. I added this to the pygame event loop to check.

elif event.type == pygame.MOUSEMOTION:        pygame.mouse.set_cursor(*pygame.cursors.diamond)

The behavior stays the same, now showing the diamond cursor while moving and 'X' Cursor when stopped. When I comment out the tkinter cursor config, I then get the windows os default cursor when motion is stopped.

The easiest solution in my mind would be to load the tkinter 'X' into pygame cursor compiler and use that as its default or under the Mouse motion event (details in link).

https://www.pygame.org/docs/ref/cursors.html

Another option I kinda liked the look of, would be to use this cursor in the mouse motion elif.

*pygame.cursors.broken_x