 			_showCloseButton = value;
 			if(closeBtn && closeBtn.visible != value)
 			{
-				closeBtn.visible = value;
+				closeBtn.visible = closeBtn.includeInLayout = value;
 				invalidateDisplayList();
 			}
 		}

			}
		}
		
		public function set showControls(value:Boolean):void
		{
			Container(windowControls).visible = value;
		}
		
		private function get windowState():int

		private var _showCloseButton:Boolean = true;
		
		/**
		 * @private
		 * Flag to determine whether or not window controls are visible.
		 */
		private var _showControls:Boolean = true;
		
		/**
		 * Height of window when minimized.
		 */
		private var _minimizeHeight:Number;
