title: How to automatically close PySimpleGUI popup?
body: <p>I'm working with PySimpleGUI and opening autoclosing popup, but it is not closing by itself, even when I press OK button. Only if I press 'X'<br />
  Here is my code:</p>
  <pre><code>import PySimpleGUI as sg
  import threading
  import time
  
  layout = [
      [sg.Text('', size=(40, 1))],
      [sg.Text('', size=(30, 2)), sg.Text('Press &quot;Start&quot; button', size=(55, 12), key='-MAIN-')],
      [sg.Button('Start', size=(10,2))],
  ]
  window = sg.Window('APP', layout)
  while True:
      event, values = window.read()
      if event == sg.WIN_CLOSED:
          break
      if event == 'Start':
          def thread_reminder(seconds):
              seconds = 0
              while True:
                  seconds += 1
                  time.sleep(1)
                  print(seconds)
                  if seconds == 10:
                      sg.popup_auto_close(&quot;1 minute passed&quot;)
          threading.Thread(target=thread_reminder, args=(1,), daemon=True).start()
  window.close()
  </code></pre>
  <p>And this gives me this error or exception, I don't know:</p>
  <pre><code>Exception in thread Thread-1:
  Traceback (most recent call last):
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python38\lib\threading.py&quot;, line 932, in _bootstrap_inner
      self.run()
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python38\lib\threading.py&quot;, line 870, in run
      self._target(*self._args, **self._kwargs)
    File &quot;C:/Users/User/Downloads/jkl;'.py&quot;, line 23, in thread_reminder
      sg.popup_auto_close(&quot;1 minute passed&quot;)
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\PySimpleGUI\PySimpleGUI.py&quot;, line 15782, in PopupAutoClose
      return Popup(*args, title=title, button_color=button_color, background_color=background_color, text_color=text_color,
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\PySimpleGUI\PySimpleGUI.py&quot;, line 15353, in Popup
      button, values = window.read()
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\PySimpleGUI\PySimpleGUI.py&quot;, line 7568, in Read
      results = self._read(timeout=timeout, timeout_key=timeout_key)
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\PySimpleGUI\PySimpleGUI.py&quot;, line 7623, in _read
      self._Show()
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\PySimpleGUI\PySimpleGUI.py&quot;, line 7395, in _Show
      StartupTK(self)
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\PySimpleGUI\PySimpleGUI.py&quot;, line 12817, in StartupTK
      window.TKroot.mainloop()
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python38\lib\tkinter\__init__.py&quot;, line 1420, in mainloop
      self.tk.mainloop(n)
  RuntimeError: Calling Tcl from different apartment
  *** Faking timeout ***
  </code></pre>
  <p><code>*** Faking timeout ***</code> means that popup must be closed, but it doesn't.<br />
  Maybe it's because of threading<br />
  Help, please!</p>