commit some X-stuff out for the gtk-version, still need to adapt to GTK