From 3d52135c3200fb2ac393404e0b106839fdac97c7 Mon Sep 17 00:00:00 2001 From: fvogel Date: Sun, 20 Sep 2020 16:06:03 +0000 Subject: Fix [d91e05bf20]: text widget will not process a <> when disabled --- library/text.tcl | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/library/text.tcl b/library/text.tcl index 0fa37e7..ec8f3d3 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -571,12 +571,7 @@ proc ::tk::TextButton1 {w x y} { } else { $w mark gravity $anchorname left } - # Allow focus in any case on Windows, because that will let the - # selection be displayed even for state disabled text widgets. - if {[tk windowingsystem] eq "win32" \ - || [$w cget -state] eq "normal"} { - focus $w - } + focus $w if {[$w cget -autoseparators]} { $w edit separator } -- cgit v0.12 From 5a024656faa09acb77aa34603e41b1cd5e38fbe5 Mon Sep 17 00:00:00 2001 From: marc_culler Date: Tue, 22 Sep 2020 19:53:41 +0000 Subject: Fix [aa4be2c1b8]: Aqua test suite hangs. --- macosx/tkMacOSXInit.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c index 0eed316..bda5f46 100644 --- a/macosx/tkMacOSXInit.c +++ b/macosx/tkMacOSXInit.c @@ -16,6 +16,7 @@ #include "tkMacOSXPrivate.h" #include #include +#include static char tkLibPath[PATH_MAX + 1] = ""; @@ -281,7 +282,10 @@ TkpInit( */ if (!initialized) { + struct stat st; Bool shouldOpenConsole = NO; + Bool stdinIsNullish = (!isatty(0) && + (fstat(0, &st) || (S_ISCHR(st.st_mode) && st.st_blocks == 0))); /* * Initialize/check OS version variable for runtime checks. @@ -371,7 +375,7 @@ TkpInit( if (getenv("TK_CONSOLE")) { shouldOpenConsole = YES; - } else if (!isatty(0) && Tcl_GetStartupScript(NULL) == NULL) { + } else if (stdinIsNullish && Tcl_GetStartupScript(NULL) == NULL) { const char *intvar = Tcl_GetVar2(interp, "tcl_interactive", NULL, TCL_GLOBAL_ONLY); if (intvar == NULL) { @@ -388,7 +392,7 @@ TkpInit( if (Tk_CreateConsoleWindow(interp) == TCL_ERROR) { return TCL_ERROR; } - } else if (!isatty(0)) { + } else if (stdinIsNullish) { /* * When launched as a macOS application with no console, -- cgit v0.12