minor refactor of UpdateWindowTree related functions
minor refactor of UpdateWindowTree related functions

akdor1154/kwm,koekeishiya/kwm,koekeishiya/kwm,cHoco/kwm,cHoco/kwm,akdor1154/kwm,cHoco/kwm,a-morales/kwm,akdor1154/kwm,a-morales/kwm,a-morales/kwm,koekeishiya/kwm