# File window.rb, line 150
  def setFocus(object)
    if @focused!=nil and not @focused.sleeping? #dont blur the object if it is the window or if it is sleeping
      @focused.blur
    end
    if object==nil
      @focused=nil
    else
      @focused=@guiWidgets[object]
    end
  end