if (window->is_visible ())                       if (window->is_showing ()) 
{                                                {
  ...                                              ...
}                                                }