Redone window_move in C
Neaten method of choosing position function