Correct check for animating non-visible windows added in r75130.

Check whether the parent is not shown instead of checking the window itself
because the window is never shown when we're in process of showing it. We need
to avoid animations in the case when it still won't be shown even after
showing it, and this is achieved by checking its parent visibility.

Closes #15643.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775