Skip to content

Commit

Permalink
tkinter: Support disabling mouse cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
einarf committed Oct 9, 2019
1 parent d81a288 commit 80e56cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions moderngl_window/context/tk/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ def __init__(self, **kwargs):
self._gl_widget = ModernglTkWindow(self._tk, width=self.width, height=self.height)
self._gl_widget.pack(fill=tkinter.BOTH, expand=tkinter.YES)
self._tk.resizable(self._resizable, self._resizable)

if self._fullscreen:
self._tk.attributes('-fullscreen', True)

if self._cursor is False:
self._tk.config(cursor="none")

# Set up events
self._gl_widget.bind('<Configure>', self.tk_resize)
self._tk.bind('<KeyPress>', self.tk_key_press)
Expand Down

0 comments on commit 80e56cd

Please sign in to comment.