From: Martin v. Löwis Date: Tue, 3 Aug 2004 19:13:18 +0000 (+0000) Subject: Add wait_visibility before grab_set. Fixes #946153. X-Git-Tag: v2.3.5c1~142 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0a49cf469991d9e5fcebe2116fda07b7b9704fca;p=thirdparty%2FPython%2Fcpython.git Add wait_visibility before grab_set. Fixes #946153. --- diff --git a/Lib/lib-tk/FileDialog.py b/Lib/lib-tk/FileDialog.py index 323dc29704b9..6efbd477b645 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 bbd6b9f80915..c3c7fd4389ee 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 01709d8103af..4d11ce020948 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: diff --git a/Misc/NEWS b/Misc/NEWS index df53b7682b1a..0b2cc51e07d8 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -43,6 +43,8 @@ Extension modules Library ------- +- Patch #946153: Add wait_visibility before grab_set. + - Patch #994595: urllib2 now recognizes Basic authentication even if other authentication schemes are offered.