Commits

Martin von Löwis committed 22ded30

Wait for visibility before setting a grab. Fixes #946153.

Comments (0)

Files changed (3)

Lib/lib-tk/FileDialog.py

         self.set_selection(default)
         self.filter_command()
         self.selection.focus_set()
+        self.top.wait_visibility() # window needs to be visible for the grab
         self.top.grab_set()
         self.how = None
         self.master.mainloop()          # Exited by self.quit(how)

Lib/lib-tk/SimpleDialog.py

         widget.deiconify() # Become visible at the desired location
 
     def go(self):
+        self.root.wait_visibility()
         self.root.grab_set()
         self.root.mainloop()
         self.root.destroy()

Lib/lib-tk/tkSimpleDialog.py

 
         self.buttonbox()
 
+        self.wait_visibility() # window needs to be visible for the grab
         self.grab_set()
 
         if not self.initial_focus: