Commit dd74369c authored by Tal Einat's avatar Tal Einat Committed by GitHub

bpo-34120: fix text viewer to call grab_release() only when needed (GH-8616)

parent 10ea9409
......@@ -83,7 +83,8 @@ class ViewWindow(Toplevel):
command=self.ok, takefocus=False)
self.viewframe.pack(side='top', expand=True, fill='both')
if modal:
self.is_modal = modal
if self.is_modal:
self.transient(parent)
self.grab_set()
if not _utest:
......@@ -91,7 +92,8 @@ class ViewWindow(Toplevel):
def ok(self, event=None):
"""Dismiss text viewer dialog."""
self.grab_release()
if self.is_modal:
self.grab_release()
self.destroy()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment