Merge branch 'glfw_upstream' of https://github.com/Luflosi/kitty

This commit is contained in:
Kovid Goyal 2019-11-22 07:11:14 +05:30
commit 1b4a6da577
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 1 deletions

4
glfw/wl_init.c vendored
View File

@ -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,7 +220,8 @@ static void pointerHandleMotion(void* data UNUSED,
default: default:
assert(0); assert(0);
} }
setCursor(cursorShape); if (_glfw.wl.cursorPreviousShape != cursorShape)
setCursor(cursorShape);
} }
static void pointerHandleButton(void* data UNUSED, static void pointerHandleButton(void* data UNUSED,

1
glfw/wl_platform.h vendored
View File

@ -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;