[[ Bug 12997 ]] Redraw entire window when changing mask.
Merge branch 'bugfix-12997' into develop