1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-22 10:18:51 -05:00

X11: Fix cursor image for captured cursor mode

This commit is contained in:
Camilla Löwy 2019-12-05 03:05:04 +01:00
parent 99b55dd21b
commit fd2d985af8

View File

@ -508,7 +508,8 @@ static char* convertLatin1toUTF8(const char* source)
//
static void updateCursorImage(_GLFWwindow* window)
{
if (window->cursorMode == GLFW_CURSOR_NORMAL)
if (window->cursorMode == GLFW_CURSOR_NORMAL ||
window->cursorMode == GLFW_CURSOR_CAPTURED)
{
if (window->cursor)
{
@ -2948,7 +2949,8 @@ void _glfwPlatformDestroyCursor(_GLFWcursor* cursor)
void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
{
if (window->cursorMode == GLFW_CURSOR_NORMAL)
if (window->cursorMode == GLFW_CURSOR_NORMAL ||
window->cursorMode == GLFW_CURSOR_CAPTURED)
{
updateCursorImage(window);
XFlush(_glfw.x11.display);