Wayland: Don’t reload the cursor on every pointer motion
From upstream: a9f674e719.
This commit is contained in:
parent
c257b7ecfd
commit
aed7a197c7
2
glfw/wl_init.c
vendored
2
glfw/wl_init.c
vendored
@ -165,6 +165,7 @@ static void setCursor(GLFWCursorShape shape)
|
|||||||
wl_surface_damage(surface, 0, 0,
|
wl_surface_damage(surface, 0, 0,
|
||||||
image->width, image->height);
|
image->width, image->height);
|
||||||
wl_surface_commit(surface);
|
wl_surface_commit(surface);
|
||||||
|
_glfw.wl.cursorPreviousShape = shape;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pointerHandleMotion(void* data UNUSED,
|
static void pointerHandleMotion(void* data UNUSED,
|
||||||
@ -219,6 +220,7 @@ static void pointerHandleMotion(void* data UNUSED,
|
|||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
}
|
}
|
||||||
|
if (_glfw.wl.cursorPreviousShape != cursorShape)
|
||||||
setCursor(cursorShape);
|
setCursor(cursorShape);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
1
glfw/wl_platform.h
vendored
1
glfw/wl_platform.h
vendored
@ -248,6 +248,7 @@ typedef struct _GLFWlibraryWayland
|
|||||||
|
|
||||||
struct wl_cursor_theme* cursorTheme;
|
struct wl_cursor_theme* cursorTheme;
|
||||||
struct wl_surface* cursorSurface;
|
struct wl_surface* cursorSurface;
|
||||||
|
GLFWCursorShape cursorPreviousShape;
|
||||||
uint32_t pointerSerial;
|
uint32_t pointerSerial;
|
||||||
|
|
||||||
int32_t keyboardRepeatRate;
|
int32_t keyboardRepeatRate;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user