summaryrefslogtreecommitdiffstats
path: root/win/tkWinScrlbr.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-10-05 11:34:45 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-10-05 11:34:45 (GMT)
commit199d4675fda94dffe00bafa804ea9f5e38f0891b (patch)
tree3902ed875b423c3eb9023c8bdd524105846cc013 /win/tkWinScrlbr.c
parent8a44d010fe0fe2f1b6787480556519e67e5458f2 (diff)
downloadtk-199d4675fda94dffe00bafa804ea9f5e38f0891b.zip
tk-199d4675fda94dffe00bafa804ea9f5e38f0891b.tar.gz
tk-199d4675fda94dffe00bafa804ea9f5e38f0891b.tar.bz2
Backport of fix for [Bug 2112563]
Diffstat (limited to 'win/tkWinScrlbr.c')
-rw-r--r--win/tkWinScrlbr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/win/tkWinScrlbr.c b/win/tkWinScrlbr.c
index a6f19bc..4435d10 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.15 2007/12/14 15:56:09 patthoyts Exp $
+ * RCS: @(#) $Id: tkWinScrlbr.c,v 1.15.2.1 2008/10/05 11:34:46 dkf Exp $
*/
#include "tkWinInt.h"
@@ -563,7 +563,7 @@ ScrollbarProc(
break;
}
- sprintf(valueString, "%g", pos);
+ Tcl_PrintDouble(NULL, pos, valueString);
Tcl_DStringAppendElement(&cmdString, "moveto");
Tcl_DStringAppendElement(&cmdString, valueString);
}
@@ -669,12 +669,12 @@ ModalLoopProc(
Tk_Window tkwin,
XEvent *eventPtr)
{
- TkWindow *winPtr = (TkWindow*)tkwin;
+ TkWindow *winPtr = (TkWindow *) tkwin;
WinScrollbar *scrollPtr = (WinScrollbar *) winPtr->instanceData;
int oldMode;
if (scrollPtr->hwnd) {
- Tcl_Preserve((ClientData)scrollPtr);
+ Tcl_Preserve(scrollPtr);
scrollPtr->winFlags |= IN_MODAL_LOOP;
oldMode = Tcl_SetServiceMode(TCL_SERVICE_ALL);
TkWinResendEvent(scrollPtr->oldProc, scrollPtr->hwnd, eventPtr);
@@ -683,7 +683,7 @@ ModalLoopProc(
if (scrollPtr->hwnd && scrollPtr->winFlags & ALREADY_DEAD) {
DestroyWindow(scrollPtr->hwnd);
}
- Tcl_Release((ClientData)scrollPtr);
+ Tcl_Release(scrollPtr);
}
}