* make the app-state a single-level table so we can easily copy it and check for changes * call invalidate_rect only if we've moved or changed orientation