bar class, window open event