Skip to content

Commit 621506a

Browse files
author
csaba
committed
Fixed the check for loading the file accessibility.tcl.
1 parent 18a90ce commit 621506a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

library/tk.tcl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -535,15 +535,15 @@ if {$::tk_library ne ""} {
535535
namespace eval :: [list source [file join $::tk_library $file.tcl]]
536536
}
537537
namespace eval ::tk {
538-
538+
539539
# Do not load accessibility.tcl if running in a safe interpreter,
540-
# under XQuartz on macOS, or if Tk on X11 was compiled without
540+
# under XQuartz on macOS, or if Tk on X11 was compiled without
541541
# accessibility support. These cause interpreter failures or Tk to
542542
# crash.
543-
if { (![interp issafe] && [info exists ::tcl_platform(os)] && \
544-
!($::tcl_platform(os) eq "Darwin" && [tk windowingsystem] eq "x11")) || \
545-
([catch {set r [tk::accessible::check_screenreader]}] == 0 && \
546-
![string match -nocase "*warning*" $r]) } {
543+
if {![interp issafe] &&
544+
!($::tcl_platform(os) eq "Darwin" && [tk windowingsystem] eq "x11") &&
545+
![catch {tk::accessible::check_screenreader} r] &&
546+
![string match -nocase "*warning*" $r]} {
547547
SourceLibFile accessibility
548548
}
549549
SourceLibFile icons

0 commit comments

Comments
 (0)