Some work towards fixing the issue showing/hiding docked windows (#344)
[ci skip].
Some minor cleaning up [ci skip].