State tax filing

I saw KS define that Kansas source income includes all income earned while a Kansas resident; income from services performed in Kansas, Kansas lottery, pari-mutuel, casino and gambling winnings; income from real or tangible personal property located in Kansas; income from a business, trade, profession or occupation operating in Kansas, including partnerships and S corporations; income from a resident estate or trust, or from a nonresident estate or trust that received income from Kansas sources; and, unemployment compensation derived from sources in Kansas. (https://www.ksrevenue.org/pdf/ip20.pdf)

 

Since i'm filling nonresident for KS, the income i earned from Missouri is not kansas soruce income even though i lived in Kansas when i earned it? But if i filled KS resident, the income from Missouri will be a kansas source income, and i have to pay tax for that income. Am i understanding right?