mirror of
https://github.com/glfw/glfw.git
synced 2024-11-14 06:23:50 +00:00
Removed broken initial cursor pos kluges.
This commit is contained in:
parent
b4e0ee418e
commit
ffc55c3509
@ -867,10 +867,6 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
|||||||
if (wndconfig->monitor)
|
if (wndconfig->monitor)
|
||||||
enterFullscreenMode(window);
|
enterFullscreenMode(window);
|
||||||
|
|
||||||
NSPoint point = [[NSCursor currentCursor] hotSpot];
|
|
||||||
window->cursorPosX = point.x;
|
|
||||||
window->cursorPosY = point.y;
|
|
||||||
|
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -762,7 +762,6 @@ static int createWindow(_GLFWwindow* window,
|
|||||||
const _GLFWfbconfig* fbconfig)
|
const _GLFWfbconfig* fbconfig)
|
||||||
{
|
{
|
||||||
int xpos, ypos, fullWidth, fullHeight;
|
int xpos, ypos, fullWidth, fullHeight;
|
||||||
POINT cursorPos;
|
|
||||||
WCHAR* wideTitle;
|
WCHAR* wideTitle;
|
||||||
|
|
||||||
window->win32.dwStyle = WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
|
window->win32.dwStyle = WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
|
||||||
@ -829,12 +828,6 @@ static int createWindow(_GLFWwindow* window,
|
|||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize cursor position data
|
|
||||||
GetCursorPos(&cursorPos);
|
|
||||||
ScreenToClient(window->win32.handle, &cursorPos);
|
|
||||||
window->win32.oldCursorX = window->cursorPosX = cursorPos.x;
|
|
||||||
window->win32.oldCursorY = window->cursorPosY = cursorPos.y;
|
|
||||||
|
|
||||||
if (!_glfwCreateContext(window, wndconfig, fbconfig))
|
if (!_glfwCreateContext(window, wndconfig, fbconfig))
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
|
|
||||||
|
@ -890,26 +890,6 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
|||||||
enterFullscreenMode(window);
|
enterFullscreenMode(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve and set initial cursor position
|
|
||||||
{
|
|
||||||
Window cursorWindow, cursorRoot;
|
|
||||||
int windowX, windowY, rootX, rootY;
|
|
||||||
unsigned int mask;
|
|
||||||
|
|
||||||
XQueryPointer(_glfw.x11.display,
|
|
||||||
window->x11.handle,
|
|
||||||
&cursorRoot,
|
|
||||||
&cursorWindow,
|
|
||||||
&rootX, &rootY,
|
|
||||||
&windowX, &windowY,
|
|
||||||
&mask);
|
|
||||||
|
|
||||||
// TODO: Probably check for some corner cases here.
|
|
||||||
|
|
||||||
window->cursorPosX = windowX;
|
|
||||||
window->cursorPosY = windowY;
|
|
||||||
}
|
|
||||||
|
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user