ui.backend.gtk: connect ui signals before realizing the widget

gtk_widget_add_events() needs to be called before gtk_widget_realize()
otherwise oxygen-gtk will steal all lmb clicks