refactor window_track_place.c