mirror of https://github.com/python/cpython
bpo-34120: fix IDLE freezing after closing dialogs (GH-8603)
Added missing .grab_release() calls to all places where we call .grab_set().
This commit is contained in:
parent
80b762f010
commit
10ea9409ce
|
@ -235,10 +235,12 @@ class GetKeysDialog(Toplevel):
|
|||
return
|
||||
if (self.advanced or self.KeysOK(keys)) and self.bind_ok(keys):
|
||||
self.result = keys
|
||||
self.grab_release()
|
||||
self.destroy()
|
||||
|
||||
def Cancel(self, event=None):
|
||||
self.result=''
|
||||
self.grab_release()
|
||||
self.destroy()
|
||||
|
||||
def KeysOK(self, keys):
|
||||
|
|
|
@ -191,6 +191,7 @@ class ConfigDialog(Toplevel):
|
|||
def destroy(self):
|
||||
global font_sample_text
|
||||
font_sample_text = self.fontpage.font_sample.get('1.0', 'end')
|
||||
self.grab_release()
|
||||
super().destroy()
|
||||
|
||||
def help(self):
|
||||
|
|
|
@ -195,6 +195,7 @@ class AboutDialog(Toplevel):
|
|||
|
||||
def ok(self, event=None):
|
||||
"Dismiss help_about dialog."
|
||||
self.grab_release()
|
||||
self.destroy()
|
||||
|
||||
|
||||
|
|
|
@ -143,6 +143,10 @@ class Query(Toplevel):
|
|||
self.result = None
|
||||
self.destroy()
|
||||
|
||||
def destroy(self):
|
||||
self.grab_release()
|
||||
super().destroy()
|
||||
|
||||
|
||||
class SectionName(Query):
|
||||
"Get a name for a config file section name."
|
||||
|
|
|
@ -91,6 +91,7 @@ class ViewWindow(Toplevel):
|
|||
|
||||
def ok(self, event=None):
|
||||
"""Dismiss text viewer dialog."""
|
||||
self.grab_release()
|
||||
self.destroy()
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Fix unresponsiveness after closing certain windows and dialogs.
|
Loading…
Reference in New Issue