code: def hide(self):
          
          if not HidePrevention(self.window).may_hide():
              return
          self.hidden = True
          self.get_widget('window-root').unstick()
          self.window.hide()
docs: Hides the main window of the terminal and sets the visible
          flag to False.