[issue44592] tkinter focus_get() with non-tkinter Tk widget

Akuli report at bugs.python.org
Sat Jul 17 14:17:08 EDT 2021


Akuli <akuviljanen17 at gmail.com> added the comment:

Here are the options:

- Do nothing. My program will error in some corner cases.

- Change it to return `None`, so `widget.focus_get() is not None` no longer means "this application doesn't have focus", but rather "this application doesn't have focus or the focused widget was not created in tkinter". Note that `focus_get()` can already return None, and we would just add one more situation where it does so.

- Change tkinter so that it doesn't matter whether a widget was created in tkinter or not. This doesn't seem to be easy.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44592>
_______________________________________


More information about the Python-bugs-list mailing list