From 61968d58b809d1dc55404e6495e47a38402f50f6 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 25 Nov 2024 11:10:12 +0000 Subject: [PATCH] Fix [bcbf4c9875]: Tk intialization overwrites thread specific data --- changes | 3 +++ generic/tkEvent.c | 34 ---------------------------------- generic/tkInt.h | 1 - generic/tkWindow.c | 1 - 4 files changed, 3 insertions(+), 36 deletions(-) diff --git a/changes b/changes index db075a825f..c93b8279a7 100644 --- a/changes +++ b/changes @@ -8249,4 +8249,7 @@ Tk Cocoa 2.0: More drawing internals refinements (culler,walzer) 2024-11-13 (bug) [36e379] [macOS Ventura] Workaround for X11 build with XQuartz: crash in XLoadQueryFont (vogel) +2024-11-25 (bug) [bcbf4c] Tk intialization overwrites thread specific data + (emiliano) + - Released 8.6.16, ??? ??, 2024 - https://core.tcl-lang.org/tk/ for details diff --git a/generic/tkEvent.c b/generic/tkEvent.c index 9c3b1b36d2..24f76253bd 100644 --- a/generic/tkEvent.c +++ b/generic/tkEvent.c @@ -981,40 +981,6 @@ Tk_DeleteClientMessageHandler( } } -/* - *---------------------------------------------------------------------- - * - * TkEventInit -- - * - * This functions initializes all the event module structures used by the - * current thread. It must be called before any other function in this - * file is called. - * - * Results: - * None. - * - * Side Effects: - * None. - * - *---------------------------------------------------------------------- - */ - -void -TkEventInit(void) -{ - ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - - tsdPtr->handlersActive = 0; - tsdPtr->pendingPtr = NULL; - tsdPtr->genericList = NULL; - tsdPtr->lastGenericPtr = NULL; - tsdPtr->cmList = NULL; - tsdPtr->lastCmPtr = NULL; - tsdPtr->restrictProc = NULL; - tsdPtr->restrictArg = NULL; -} - /* *---------------------------------------------------------------------- * diff --git a/generic/tkInt.h b/generic/tkInt.h index acbd98cf51..a786c1537b 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -1253,7 +1253,6 @@ MODULE_SCOPE int TkSetGeometryContainer(Tcl_Interp *interp, MODULE_SCOPE void TkFreeGeometryContainer(Tk_Window tkwin, const char *name); -MODULE_SCOPE void TkEventInit(void); MODULE_SCOPE void TkRegisterObjTypes(void); MODULE_SCOPE int TkDeadAppObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); diff --git a/generic/tkWindow.c b/generic/tkWindow.c index b0971ae4e8..e4b8ad3c4f 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -878,7 +878,6 @@ TkCreateMainWindow( mainPtr->interp = interp; Tcl_InitHashTable(&mainPtr->nameTable, TCL_STRING_KEYS); mainPtr->deletionEpoch = 0l; - TkEventInit(); TkBindInit(mainPtr); TkFontPkgInit(mainPtr); TkStylePkgInit(mainPtr);