auto adjust window preferences