summaryrefslogtreecommitdiffstats
path: root/win/tclWinNotify.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tclWinNotify.c')
-rw-r--r--win/tclWinNotify.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c
index 47ad88f..4543b02 100644
--- a/win/tclWinNotify.c
+++ b/win/tclWinNotify.c
@@ -9,8 +9,6 @@
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
- *
- * RCS: @(#) $Id: tclWinNotify.c,v 1.25 2008/10/26 18:43:27 dkf Exp $
*/
#include "tclInt.h"
@@ -52,6 +50,7 @@ static Tcl_ThreadDataKey dataKey;
*/
static int notifierCount = 0;
+static const TCHAR classname[] = TEXT("TclNotifier");
TCL_DECLARE_MUTEX(notifierMutex)
/*
@@ -99,12 +98,12 @@ Tcl_InitNotifier(void)
class.hInstance = TclWinGetTclInstance();
class.hbrBackground = NULL;
class.lpszMenuName = NULL;
- class.lpszClassName = "TclNotifier";
+ class.lpszClassName = classname;
class.lpfnWndProc = NotifierProc;
class.hIcon = NULL;
class.hCursor = NULL;
- if (!RegisterClassA(&class)) {
+ if (!RegisterClass(&class)) {
Tcl_Panic("Unable to register TclNotifier window class");
}
}
@@ -121,7 +120,7 @@ Tcl_InitNotifier(void)
tsdPtr->event = CreateEvent(NULL, TRUE /* manual */,
FALSE /* !signaled */, NULL);
- return (ClientData) tsdPtr;
+ return tsdPtr;
}
}
@@ -187,7 +186,7 @@ Tcl_FinalizeNotifier(
Tcl_MutexLock(&notifierMutex);
notifierCount--;
if (notifierCount == 0) {
- UnregisterClassA("TclNotifier", TclWinGetTclInstance());
+ UnregisterClass(classname, TclWinGetTclInstance());
}
Tcl_MutexUnlock(&notifierMutex);
}
@@ -351,7 +350,7 @@ Tcl_ServiceModeHook(
*/
if (mode == TCL_SERVICE_ALL && !tsdPtr->hwnd) {
- tsdPtr->hwnd = CreateWindowA("TclNotifier", "TclNotifier",
+ tsdPtr->hwnd = CreateWindow(classname, classname,
WS_TILED, 0, 0, 0, 0, NULL, NULL, TclWinGetTclInstance(),
NULL);
@@ -362,7 +361,7 @@ Tcl_ServiceModeHook(
* if one is needed.
*/
- Tcl_AlertNotifier((ClientData)tsdPtr);
+ Tcl_AlertNotifier(tsdPtr);
}
}
}
@@ -507,7 +506,7 @@ Tcl_WaitForEvent(
PostQuitMessage((int) msg.wParam);
status = -1;
- } else if (result == -1) {
+ } else if (result == (DWORD)-1) {
/*
* We got an error from the system. I have no idea why this
* would happen, so we'll just unwind.