adjust menu position if it will be clipped by window edge