Don't use gtk_window_present()
Its docs say:
This function should not be used as when it is called, it is too late to gather a valid timestamp to allow focus stealing prevention to work correctly.
I believe gtk_widget_show_all()
is the good replacement.