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

Simple change of order so that gtk_widget_add_events is called and then gtk_widget_realize. It stops oxygen-gtk from stealing clicks and I also think it is "best practice" recommended by gtk developers.