update:
- add missing features to setup a window more correctly.
- remove code analysis findings.

Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>