Take into account window activation to set visible
Merge remote-tracking branch 'chiiph/bug/better_hideshow_handling' into develop