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 a847938..f74ac52 100644
--- a/win/tkWinX.c
+++ b/win/tkWinX.c
@@ -260,10 +260,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);
}
@@ -484,8 +484,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(screen->root_visual);
@@ -1428,7 +1428,7 @@ UpdateInputLanguage(
if (keyInputCharset == charset) {
return;
}
- if (TranslateCharsetInfo((DWORD*)charset, &charsetInfo,
+ if (TranslateCharsetInfo(INT2PTR(charset), &charsetInfo,
TCI_SRCCHARSET) == 0) {
/*
* Some mysterious failure.
@@ -1916,7 +1916,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));
}