Add window fill function (Bug #2319), patch from Stephan Arts (psybsd@gmail.com) applied with changes (Old svn revision: 25836)