Widget.hasFocus

bool hasFocus()

Determines if the widget has the global input focus.

See [gtk.widget.Widget.isFocus] for the difference between having the global input focus, and only having the focus within a toplevel.

Returns

true if the widget has the global input focus.