parent
a9e739e08d
commit
c68516ca8d
@ -21,6 +21,8 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
|||||||
:option:`kitty --single-instance` using the :option:`kitty --override` command line
|
:option:`kitty --single-instance` using the :option:`kitty --override` command line
|
||||||
argument (:iss:`2806`)
|
argument (:iss:`2806`)
|
||||||
|
|
||||||
|
- Wayland: Fix a crash when using animated mouse cursors (:iss:`2810`)
|
||||||
|
|
||||||
|
|
||||||
0.18.1 [2020-06-23]
|
0.18.1 [2020-06-23]
|
||||||
--------------------
|
--------------------
|
||||||
|
|||||||
2
glfw/wl_platform.h
vendored
2
glfw/wl_platform.h
vendored
@ -287,7 +287,7 @@ typedef struct _GLFWcursorWayland
|
|||||||
struct wl_buffer* buffer;
|
struct wl_buffer* buffer;
|
||||||
int width, height;
|
int width, height;
|
||||||
int xhot, yhot;
|
int xhot, yhot;
|
||||||
int currentImage;
|
unsigned int currentImage;
|
||||||
/** The scale of the cursor, or 0 if the cursor should be loaded late, or -1 if the cursor variable itself is unused. */
|
/** The scale of the cursor, or 0 if the cursor should be loaded late, or -1 if the cursor variable itself is unused. */
|
||||||
int scale;
|
int scale;
|
||||||
/** Cursor shape stored to allow late cursor loading in setCursorImage. */
|
/** Cursor shape stored to allow late cursor loading in setCursorImage. */
|
||||||
|
|||||||
4
glfw/wl_window.c
vendored
4
glfw/wl_window.c
vendored
@ -68,12 +68,14 @@ setCursorImage(_GLFWwindow* window)
|
|||||||
if (newCursor != NULL) {
|
if (newCursor != NULL) {
|
||||||
cursorWayland->cursor = newCursor;
|
cursorWayland->cursor = newCursor;
|
||||||
cursorWayland->scale = scale;
|
cursorWayland->scale = scale;
|
||||||
|
cursorWayland->currentImage = 0;
|
||||||
} else {
|
} else {
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR, "Wayland: late cursor load failed; proceeding with existing cursor");
|
_glfwInputError(GLFW_PLATFORM_ERROR, "Wayland: late cursor load failed; proceeding with existing cursor");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!cursorWayland->cursor)
|
if (!cursorWayland->cursor || !cursorWayland->cursor->image_count)
|
||||||
return;
|
return;
|
||||||
|
if (cursorWayland->currentImage >= cursorWayland->cursor->image_count) cursorWayland->currentImage = 0;
|
||||||
image = cursorWayland->cursor->images[cursorWayland->currentImage];
|
image = cursorWayland->cursor->images[cursorWayland->currentImage];
|
||||||
buffer = wl_cursor_image_get_buffer(image);
|
buffer = wl_cursor_image_get_buffer(image);
|
||||||
if (image->delay && window->cursor) {
|
if (image->delay && window->cursor) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user