properly handle gtk windows