def ungrab( self ): Gtk.grab_remove(self.window) self.window.hide() Gdk.pointer_ungrab(Gdk.CURRENT_TIME) Gdk.keyboard_ungrab(Gdk.CURRENT_TIME)