title: main window getting focus when opening dialog in python
body: <p>I'm using python3 on windows and when I'm pressing the 'open_dialog_button' a dialog is indeed opening (and above all windows and that's good) but the main window is jumping in front of the new window, how do I prevent from the main window to get focus when I'm pressing the dialog button?
  I want the main window to be in the back then the new window the the dialog window, I've tries lift() but its working just before and after the dialog window not in the process of the dialog button, I also tried attributes('-topmost', True) but then the new window is above the dialog window as well and I don't want that..<br />
  here is just a code example of my specific problem:</p>
  <pre><code>import tkinter.ttk as ttk
  import tkinter as tk
  from tkinter import filedialog
  
  
  class MainWindow(tk.Tk):
      def __init__(self, *args, **kwargs):
          tk.Tk.__init__(self, *args, **kwargs)
          self.title(&quot;main window&quot;)
          self.geometry('100x100')
          self.new_window_button = ttk.Button(self, text=&quot;open new window&quot;, command=self.open_new_window)
          self.new_window_button.pack()
  
      def open_new_window(self):
          NewWindow(self)
  
  
  class NewWindow(tk.Toplevel):
      def __init__(self, master, *args, **kwargs):
          tk.Toplevel.__init__(self, master, *args, **kwargs)
          self.title(&quot;new window&quot;)
          self.geometry('100x100')
          path = &quot;&quot;
          self.open_dialog_button = ttk.Button(self, text='open dialog', command=self.open_dialog)
          self.open_dialog_button.pack()
  
      def open_dialog(self):
          global path
          path = filedialog.askopenfilename(initialdir=&quot;/c&quot;, title=&quot;Choose File&quot;)
  
  
  def main():
      run = MainWindow()
      run.mainloop()
  
  
  if __name__ == '__main__':
      main()
  </code></pre>