Event hack now works if inner window is maximized (see #15)