summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-08-02 06:37:50 (GMT)
committerGitHub <noreply@github.com>2018-08-02 06:37:50 (GMT)
commitd9fc795487f74531ea43760469cc215858d0d908 (patch)
treea9df63e10deafa4bd6b84088924ec2c91d163a3d
parent172a81e42bc30da1bd4027db9cd3b6172469f7fe (diff)
downloadcpython-d9fc795487f74531ea43760469cc215858d0d908.zip
cpython-d9fc795487f74531ea43760469cc215858d0d908.tar.gz
cpython-d9fc795487f74531ea43760469cc215858d0d908.tar.bz2
bpo-34120: fix IDLE freezing after closing dialogs (GH-8603)
Added missing .grab_release() calls to all places where we call .grab_set(). (cherry picked from commit 10ea9409ceb5da83cb380b610750551e26561044) Co-authored-by: Tal Einat <taleinat+github@gmail.com>
-rw-r--r--Lib/idlelib/config_key.py2
-rw-r--r--Lib/idlelib/configdialog.py1
-rw-r--r--Lib/idlelib/help_about.py1
-rw-r--r--Lib/idlelib/query.py4
-rw-r--r--Lib/idlelib/textview.py1
-rw-r--r--Misc/NEWS.d/next/IDLE/2018-08-01-23-25-38.bpo-34120.HgsIz-.rst1
6 files changed, 10 insertions, 0 deletions
diff --git a/Lib/idlelib/config_key.py b/Lib/idlelib/config_key.py
index 7f4bb49..abab742 100644
--- a/Lib/idlelib/config_key.py
+++ b/Lib/idlelib/config_key.py
@@ -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):
diff --git a/Lib/idlelib/configdialog.py b/Lib/idlelib/configdialog.py
index c783238..e682ec0 100644
--- a/Lib/idlelib/configdialog.py
+++ b/Lib/idlelib/configdialog.py
@@ -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):
diff --git a/Lib/idlelib/help_about.py b/Lib/idlelib/help_about.py
index 2a274a9..64b13ac 100644
--- a/Lib/idlelib/help_about.py
+++ b/Lib/idlelib/help_about.py
@@ -195,6 +195,7 @@ class AboutDialog(Toplevel):
def ok(self, event=None):
"Dismiss help_about dialog."
+ self.grab_release()
self.destroy()
diff --git a/Lib/idlelib/query.py b/Lib/idlelib/query.py
index 15add6d..c2628cc 100644
--- a/Lib/idlelib/query.py
+++ b/Lib/idlelib/query.py
@@ -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."
diff --git a/Lib/idlelib/textview.py b/Lib/idlelib/textview.py
index d9260e6..e78e297 100644
--- a/Lib/idlelib/textview.py
+++ b/Lib/idlelib/textview.py
@@ -91,6 +91,7 @@ class ViewWindow(Toplevel):
def ok(self, event=None):
"""Dismiss text viewer dialog."""
+ self.grab_release()
self.destroy()
diff --git a/Misc/NEWS.d/next/IDLE/2018-08-01-23-25-38.bpo-34120.HgsIz-.rst b/Misc/NEWS.d/next/IDLE/2018-08-01-23-25-38.bpo-34120.HgsIz-.rst
new file mode 100644
index 0000000..f9954f7
--- /dev/null
+++ b/Misc/NEWS.d/next/IDLE/2018-08-01-23-25-38.bpo-34120.HgsIz-.rst
@@ -0,0 +1 @@
+Fix unresponsiveness after closing certain windows and dialogs. \ No newline at end of file