Wayland: Don’t reload the cursor on every pointer motion
From upstream: a9f674e719.
This commit is contained in:
4
glfw/wl_init.c
vendored
4
glfw/wl_init.c
vendored
@@ -165,6 +165,7 @@ static void setCursor(GLFWCursorShape shape)
|
||||
wl_surface_damage(surface, 0, 0,
|
||||
image->width, image->height);
|
||||
wl_surface_commit(surface);
|
||||
_glfw.wl.cursorPreviousShape = shape;
|
||||
}
|
||||
|
||||
static void pointerHandleMotion(void* data UNUSED,
|
||||
@@ -219,7 +220,8 @@ static void pointerHandleMotion(void* data UNUSED,
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
setCursor(cursorShape);
|
||||
if (_glfw.wl.cursorPreviousShape != cursorShape)
|
||||
setCursor(cursorShape);
|
||||
}
|
||||
|
||||
static void pointerHandleButton(void* data UNUSED,
|
||||
|
||||
Reference in New Issue
Block a user