Fixed dock windows size calculation to avoid crash on Mono/Linux.