         // work around for bugs SDK-9547 & SDK-21190
         maximizeButton.dispatchEvent(new MouseEvent(MouseEvent.ROLL_OUT));
 
-        invalidateSkinState();
-
     }
     
     /**

import flash.display.NativeWindowDisplayState;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.system.Capabilities;

import mx.core.IWindow;

    {
        window.close();
    }
    
    /**
     *  @private
     */
    private function window_displayStateChangeHandler(
                       event:NativeWindowDisplayStateEvent):void
    {
        // If we have been minimized or maximized then invalidate our skin state 
        // so the maximize and restore buttons will be updated.
        if (event.afterDisplayState == NativeWindowDisplayState.MAXIMIZED ||
            event.afterDisplayState == NativeWindowDisplayState.NORMAL)
        {
            invalidateSkinState();
        }
    }
    
}

}
