set/get foreground window