Skip to content

Commit 8c27786

Browse files
miss-islingtonvstinnerserhiy-storchaka
authored
[3.14] gh-159517: Modernize tkinter.simpledialog (GH-159518) (#159522)
[3.15] gh-159517: Modernize tkinter.simpledialog (GH-159518) gh-159517: Modernize tkinter.simpledialog No longer call ::tk::unsupported::MacWindowStyle on Tcl 9.1 and newer. (cherry picked from commit 173dabe) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent 76f4555 commit 8c27786

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎Lib/tkinter/simpledialog.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,11 @@ def _place_window(w, parent=None):
259259

260260
def _setup_dialog(w):
261261
if w._windowingsystem == "aqua":
262-
w.tk.call("::tk::unsupported::MacWindowStyle", "style",
263-
w, "moveableModal", "")
262+
if w.info_patchlevel() >= (9, 1):
263+
w.wm_attributes(stylemask='titled')
264+
else:
265+
w.tk.call('::tk::unsupported::MacWindowStyle', 'style',
266+
w, 'moveableModal', '')
264267
elif w._windowingsystem == "x11":
265268
w.wm_attributes(type="dialog")
266269

0 commit comments

Comments
 (0)