diff options
-rw-r--r-- | unix/vncconfig/vncExt.c | 5 | ||||
-rw-r--r-- | win/rfb_win32/CleanDesktop.cxx | 12 | ||||
-rw-r--r-- | win/rfb_win32/MsgWindow.cxx | 7 | ||||
-rw-r--r-- | win/wm_hooks/wm_hooks.cxx | 4 |
4 files changed, 15 insertions, 13 deletions
diff --git a/unix/vncconfig/vncExt.c b/unix/vncconfig/vncExt.c index f4ade8c1..eef7c4b5 100644 --- a/unix/vncconfig/vncExt.c +++ b/unix/vncconfig/vncExt.c @@ -16,6 +16,7 @@ * USA. */ #include <stdio.h> +#include <stdint.h> #define NEED_REPLIES #include <X11/Xlib.h> @@ -336,7 +337,7 @@ Bool XVncExtGetQueryConnect(Display* dpy, char** addr, char** user, _XReadPad(dpy, *user, rep.userLen); (*user)[rep.userLen] = 0; *timeout = rep.timeout; - *opaqueId = (void*)rep.opaqueId; + *opaqueId = (void*)(intptr_t)rep.opaqueId; return True; } @@ -351,7 +352,7 @@ Bool XVncExtApproveConnect(Display* dpy, void* opaqueId, int approve) req->reqType = codes->major_opcode; req->vncExtReqType = X_VncExtApproveConnect; req->approve = approve; - req->opaqueId = (CARD32)opaqueId; + req->opaqueId = (CARD32)(intptr_t)opaqueId; UnlockDisplay(dpy); SyncHandle(); return True; diff --git a/win/rfb_win32/CleanDesktop.cxx b/win/rfb_win32/CleanDesktop.cxx index 90b3451b..8009fc8b 100644 --- a/win/rfb_win32/CleanDesktop.cxx +++ b/win/rfb_win32/CleanDesktop.cxx @@ -303,12 +303,12 @@ void CleanDesktop::enableEffects() { desktopCfg.openKey(HKEY_CURRENT_USER, _T("Control Panel\\Desktop")); SysParamsInfo(SPI_SETFONTSMOOTHING, desktopCfg.getInt(_T("FontSmoothing"), 0) != 0, 0, SPIF_SENDCHANGE); #ifdef RFB_HAVE_SPI_UIEFFECTS - if (SysParamsInfo(SPI_SETUIEFFECTS, 0, (void*)uiEffects, SPIF_SENDCHANGE) == ERROR_CALL_NOT_IMPLEMENTED) { - SysParamsInfo(SPI_SETCOMBOBOXANIMATION, 0, (void*)comboBoxAnim, SPIF_SENDCHANGE); - SysParamsInfo(SPI_SETGRADIENTCAPTIONS, 0, (void*)gradientCaptions, SPIF_SENDCHANGE); - SysParamsInfo(SPI_SETHOTTRACKING, 0, (void*)hotTracking, SPIF_SENDCHANGE); - SysParamsInfo(SPI_SETLISTBOXSMOOTHSCROLLING, 0, (void*)listBoxSmoothScroll, SPIF_SENDCHANGE); - SysParamsInfo(SPI_SETMENUANIMATION, 0, (void*)menuAnim, SPIF_SENDCHANGE); + if (SysParamsInfo(SPI_SETUIEFFECTS, 0, (void*)(intptr_t)uiEffects, SPIF_SENDCHANGE) == ERROR_CALL_NOT_IMPLEMENTED) { + SysParamsInfo(SPI_SETCOMBOBOXANIMATION, 0, (void*)(intptr_t)comboBoxAnim, SPIF_SENDCHANGE); + SysParamsInfo(SPI_SETGRADIENTCAPTIONS, 0, (void*)(intptr_t)gradientCaptions, SPIF_SENDCHANGE); + SysParamsInfo(SPI_SETHOTTRACKING, 0, (void*)(intptr_t)hotTracking, SPIF_SENDCHANGE); + SysParamsInfo(SPI_SETLISTBOXSMOOTHSCROLLING, 0, (void*)(intptr_t)listBoxSmoothScroll, SPIF_SENDCHANGE); + SysParamsInfo(SPI_SETMENUANIMATION, 0, (void*)(intptr_t)menuAnim, SPIF_SENDCHANGE); } restoreEffects = false; #else diff --git a/win/rfb_win32/MsgWindow.cxx b/win/rfb_win32/MsgWindow.cxx index 1d585618..8086bea0 100644 --- a/win/rfb_win32/MsgWindow.cxx +++ b/win/rfb_win32/MsgWindow.cxx @@ -85,7 +85,7 @@ MsgWindowClass::MsgWindowClass() : classAtom(0) { MsgWindowClass::~MsgWindowClass() { if (classAtom) { - UnregisterClass((const TCHAR*)classAtom, instance); + UnregisterClass((const TCHAR*)(intptr_t)classAtom, instance); } } @@ -97,8 +97,9 @@ static MsgWindowClass baseClass; MsgWindow::MsgWindow(const TCHAR* name_) : name(tstrDup(name_)), handle(0) { vlog.debug("creating window \"%s\"", (const char*)CStr(name.buf)); - handle = CreateWindow((const TCHAR*)baseClass.classAtom, name.buf, WS_OVERLAPPED, - 0, 0, 10, 10, 0, 0, baseClass.instance, this); + handle = CreateWindow((const TCHAR*)(intptr_t)baseClass.classAtom, + name.buf, WS_OVERLAPPED, 0, 0, 10, 10, 0, 0, + baseClass.instance, this); if (!handle) { throw rdr::SystemException("unable to create WMNotifier window instance", GetLastError()); } diff --git a/win/wm_hooks/wm_hooks.cxx b/win/wm_hooks/wm_hooks.cxx index 50a981e8..c0350cd2 100644 --- a/win/wm_hooks/wm_hooks.cxx +++ b/win/wm_hooks/wm_hooks.cxx @@ -204,11 +204,11 @@ void ProcessWindowMessage(UINT msg, HWND wnd, WPARAM wParam, LPARAM lParam) { // Handle pop-up menus having items selected case 485: { - HANDLE prop = GetProp(wnd, (LPCTSTR) MAKELONG(ATOM_Popup_Selection, 0)); + HANDLE prop = GetProp(wnd, (LPCTSTR) (intptr_t) ATOM_Popup_Selection); if (prop != (HANDLE) wParam) { NotifyWindow(wnd, 485); SetProp(wnd, - (LPCTSTR) MAKELONG(ATOM_Popup_Selection, 0), + (LPCTSTR) (intptr_t) ATOM_Popup_Selection, (HANDLE) wParam); } } |