window1 = builder.get_object('window1')
window1.connect('focus-in-event', focus_handler)
window1.show_all()
signal.signal(signal.SIGINT, signal.SIG_DFL)
Gtk.main()
How to unfocus (blur) Python-gi GTK+3 window on Linux