use leave-notify-event to handle lost_focus