Restore safe reinterpret_casts in MSWindowsDesks
This commit is contained in:
parent
f7ad162634
commit
2a5dc62747
|
@ -241,7 +241,7 @@ void
|
||||||
MSWindowsDesks::getCursorPos(SInt32& x, SInt32& y) const
|
MSWindowsDesks::getCursorPos(SInt32& x, SInt32& y) const
|
||||||
{
|
{
|
||||||
POINT pos;
|
POINT pos;
|
||||||
sendMessage(SYNERGY_MSG_CURSOR_POS, static_cast<WPARAM>(&pos), 0);
|
sendMessage(SYNERGY_MSG_CURSOR_POS, reinterpret_cast<WPARAM>(&pos), 0);
|
||||||
x = pos.x;
|
x = pos.x;
|
||||||
y = pos.y;
|
y = pos.y;
|
||||||
}
|
}
|
||||||
|
@ -427,7 +427,7 @@ void
|
||||||
MSWindowsDesks::destroyClass(ATOM windowClass) const
|
MSWindowsDesks::destroyClass(ATOM windowClass) const
|
||||||
{
|
{
|
||||||
if (windowClass != 0) {
|
if (windowClass != 0) {
|
||||||
UnregisterClass(static_cast<LPCTSTR>(windowClass),
|
UnregisterClass(reinterpret_cast<LPCTSTR>(windowClass),
|
||||||
MSWindowsScreen::getWindowInstance());
|
MSWindowsScreen::getWindowInstance());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -437,7 +437,7 @@ MSWindowsDesks::createWindow(ATOM windowClass, const char* name) const
|
||||||
{
|
{
|
||||||
HWND window = CreateWindowEx(WS_EX_TRANSPARENT |
|
HWND window = CreateWindowEx(WS_EX_TRANSPARENT |
|
||||||
WS_EX_TOOLWINDOW,
|
WS_EX_TOOLWINDOW,
|
||||||
static_cast<LPCTSTR>(windowClass),
|
reinterpret_cast<LPCTSTR>(windowClass),
|
||||||
name,
|
name,
|
||||||
WS_POPUP,
|
WS_POPUP,
|
||||||
0, 0, 1, 1,
|
0, 0, 1, 1,
|
||||||
|
@ -757,7 +757,7 @@ MSWindowsDesks::deskThread(void* vdesk)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SYNERGY_MSG_CURSOR_POS: {
|
case SYNERGY_MSG_CURSOR_POS: {
|
||||||
POINT* pos = static_cast<POINT*>(msg.wParam);
|
POINT* pos = reinterpret_cast<POINT*>(msg.wParam);
|
||||||
if (!GetCursorPos(pos)) {
|
if (!GetCursorPos(pos)) {
|
||||||
pos->x = m_xCenter;
|
pos->x = m_xCenter;
|
||||||
pos->y = m_yCenter;
|
pos->y = m_yCenter;
|
||||||
|
|
Loading…
Reference in New Issue