Especially for the case where the windows are docked as tabs in the
same position, the "visibility-changed" signal does not work as close
indicator. The window is also treated as invisible when just the tab
is invisible, not only in case the window is closed.