Made a mistake with types of window, get_window actually refers to GdkWindow rather than GtkWindow... The use of self.window.window is confusing and is still deprecated in Gtk3 so will fix that in following commit. This reverts commit ccfe6b3c80e054893ae6a626c46be5e3024d8a45.