mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-11 01:28:19 +03:00
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
|
||||
argument (:iss:`2806`)
|
||||
|
||||
- Wayland: Fix a crash when using animated mouse cursors (:iss:`2810`)
|
||||
|
||||
|
||||
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;
|
||||
int width, height;
|
||||
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. */
|
||||
int scale;
|
||||
/** 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) {
|
||||
cursorWayland->cursor = newCursor;
|
||||
cursorWayland->scale = scale;
|
||||
cursorWayland->currentImage = 0;
|
||||
} else {
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR, "Wayland: late cursor load failed; proceeding with existing cursor");
|
||||
}
|
||||
}
|
||||
if (!cursorWayland->cursor)
|
||||
if (!cursorWayland->cursor || !cursorWayland->cursor->image_count)
|
||||
return;
|
||||
if (cursorWayland->currentImage >= cursorWayland->cursor->image_count) cursorWayland->currentImage = 0;
|
||||
image = cursorWayland->cursor->images[cursorWayland->currentImage];
|
||||
buffer = wl_cursor_image_get_buffer(image);
|
||||
if (image->delay && window->cursor) {
|
||||
|
Loading…
Reference in New Issue
Block a user