summaryrefslogtreecommitdiffstats
path: root/win/tkWinX.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tkWinX.c')
-rw-r--r--win/tkWinX.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/win/tkWinX.c b/win/tkWinX.c
index 288da26..2d5f5f5 100644
--- a/win/tkWinX.c
+++ b/win/tkWinX.c
@@ -296,10 +296,10 @@ TkWinXInit(
* Initialize input language info
*/
- if (GetLocaleInfo(LANGIDFROMLCID((DWORD)GetKeyboardLayout(0)),
+ if (GetLocaleInfo(LANGIDFROMLCID(PTR2INT(GetKeyboardLayout(0))),
LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER,
(LPTSTR) &lpCP, sizeof(lpCP)/sizeof(TCHAR))
- && TranslateCharsetInfo((DWORD *)lpCP, &lpCs, TCI_SRCCODEPAGE)) {
+ && TranslateCharsetInfo(INT2PTR(lpCP), &lpCs, TCI_SRCCODEPAGE)) {
UpdateInputLanguage((int) lpCs.ciCharset);
}
@@ -519,8 +519,8 @@ TkWinDisplayChanged(
* the HWND and we'll just get blank spots copied onto the screen.
*/
- screen->ext_data = (XExtData *) GetDeviceCaps(dc, PLANES);
- screen->root_depth = GetDeviceCaps(dc, BITSPIXEL) * (int) screen->ext_data;
+ screen->ext_data = INT2PTR(GetDeviceCaps(dc, PLANES));
+ screen->root_depth = GetDeviceCaps(dc, BITSPIXEL) * PTR2INT(screen->ext_data);
if (screen->root_visual != NULL) {
ckfree((char *) screen->root_visual);
@@ -1452,7 +1452,7 @@ UpdateInputLanguage(
if (keyInputCharset == charset) {
return;
}
- if (TranslateCharsetInfo((DWORD*)charset, &charsetInfo,
+ if (TranslateCharsetInfo(INT2PTR(charset), &charsetInfo,
TCI_SRCCHARSET) == 0) {
/*
* Some mysterious failure.
@@ -1995,7 +1995,7 @@ Tk_ResetUserInactiveTime(
inp.mi.mouseData = 0;
inp.mi.dwFlags = MOUSEEVENTF_MOVE;
inp.mi.time = 0;
- inp.mi.dwExtraInfo = (DWORD) NULL;
+ inp.mi.dwExtraInfo = (DWORD) 0;
SendInput(1, &inp, sizeof(inp));
}