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

		private var _showCloseButton:Boolean = true;
		
		/**
		 * Height of window when minimized.
		 */
		private var _minimizeHeight:Number;

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