Update window_event.c

bug "fix"