summaryrefslogtreecommitdiffstats
path: root/win/tkWinScrlbr.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tkWinScrlbr.c')
-rw-r--r--win/tkWinScrlbr.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/win/tkWinScrlbr.c b/win/tkWinScrlbr.c
index 619a6f9..e81e77c 100644
--- a/win/tkWinScrlbr.c
+++ b/win/tkWinScrlbr.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinScrlbr.c,v 1.2 1998/09/14 18:24:01 stanton Exp $
+ * RCS: @(#) $Id: tkWinScrlbr.c,v 1.3 1999/04/16 01:51:53 stanton Exp $
*/
#include "tkWinInt.h"
@@ -57,12 +57,14 @@ static int initialized = 0;
static int hArrowWidth, hThumb; /* Horizontal control metrics. */
static int vArrowWidth, vArrowHeight, vThumb; /* Vertical control metrics. */
+TCL_DECLARE_MUTEX(winScrlbrMutex)
+
/*
* This variable holds the default width for a scrollbar in string
* form for use in a Tk_ConfigSpec.
*/
-static char defWidth[8];
+static char defWidth[TCL_INTEGER_SPACE];
/*
* Declarations for functions defined in this file.
@@ -116,8 +118,10 @@ TkpCreateScrollbar(tkwin)
TkWindow *winPtr = (TkWindow *)tkwin;
if (!initialized) {
+ Tcl_MutexLock(&winScrlbrMutex);
UpdateScrollbarMetrics();
initialized = 1;
+ Tcl_MutexUnlock(&winScrlbrMutex);
}
scrollPtr = (WinScrollbar *) ckalloc(sizeof(WinScrollbar));