adjust maximized and fullscreen behavior #382