diff options
-rw-r--r-- | Lib/lib-tk/FileDialog.py | 1 | ||||
-rw-r--r-- | Lib/lib-tk/SimpleDialog.py | 1 | ||||
-rw-r--r-- | Lib/lib-tk/tkSimpleDialog.py | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/Lib/lib-tk/FileDialog.py b/Lib/lib-tk/FileDialog.py index 5e848da..b08d3a8 100644 --- a/Lib/lib-tk/FileDialog.py +++ b/Lib/lib-tk/FileDialog.py @@ -119,6 +119,7 @@ class FileDialog: 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) diff --git a/Lib/lib-tk/SimpleDialog.py b/Lib/lib-tk/SimpleDialog.py index bb63a8d..cb08318 100644 --- a/Lib/lib-tk/SimpleDialog.py +++ b/Lib/lib-tk/SimpleDialog.py @@ -64,6 +64,7 @@ class SimpleDialog: 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() diff --git a/Lib/lib-tk/tkSimpleDialog.py b/Lib/lib-tk/tkSimpleDialog.py index 01709d8..4d11ce0 100644 --- a/Lib/lib-tk/tkSimpleDialog.py +++ b/Lib/lib-tk/tkSimpleDialog.py @@ -61,6 +61,7 @@ class Dialog(Toplevel): self.buttonbox() + self.wait_visibility() # window needs to be visible for the grab self.grab_set() if not self.initial_focus: |