This commit is contained in:
Diego91b 2015-06-10 07:34:14 +00:00
commit e90b34fa96

View File

@ -71,13 +71,18 @@ static getWindowExStyle(const _GLFWwindow* window)
// Updates the cursor clip rect // Updates the cursor clip rect
// //
static void updateClipRect(_GLFWwindow* window) static BOOL updateClipRect(_GLFWwindow* window)
{ {
RECT clipRect; RECT clipRect;
GetClientRect(window->win32.handle, &clipRect); if (GetClientRect(window->win32.handle, &clipRect))
ClientToScreen(window->win32.handle, (POINT*) &clipRect.left); {
ClientToScreen(window->win32.handle, (POINT*) &clipRect.right); if (ClientToScreen(window->win32.handle, (POINT*) &clipRect.left))
ClipCursor(&clipRect); {
if (ClientToScreen(window->win32.handle, (POINT*) &clipRect.right))
return ClipCursor(&clipRect);
}
}
return FALSE;
} }
// Hide the mouse cursor // Hide the mouse cursor