Search code examples
gtkpygtkgtkmmvala

How to disable focus grabbing for GTK+ tool button


GTK+ Button widget has focus_on_click property that controls grabbing of focus. But I use MenuToolButton that has no such a property. I don't want the focus on click.

How to get rid of it? Thanks!


Solution

  • If you don't want focus_on_click, you probably don't want focus gererally.

    widget.set_can_focus(False)