shell: fix calculation of available window area with different panel positions