Window type automatic closing device