mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Better error reporting when failing to load cursor
This commit is contained in:
2
glfw/wl_init.c
vendored
2
glfw/wl_init.c
vendored
@@ -138,7 +138,7 @@ static void setCursor(const char* name)
|
||||
if (!cursor)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: Standard cursor not found");
|
||||
"Wayland: Standard cursor %s not found", name);
|
||||
return;
|
||||
}
|
||||
// TODO: handle animated cursors too.
|
||||
|
||||
7
glfw/wl_window.c
vendored
7
glfw/wl_window.c
vendored
@@ -879,7 +879,7 @@ handleEvents(double timeout)
|
||||
|
||||
// Translates a GLFW standard cursor to a theme cursor name
|
||||
//
|
||||
static char *translateCursorShape(int shape)
|
||||
static const char *translateCursorShape(int shape)
|
||||
{
|
||||
switch (shape)
|
||||
{
|
||||
@@ -1555,12 +1555,11 @@ void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
|
||||
setCursorImage(&cursor->wl);
|
||||
else
|
||||
{
|
||||
defaultCursor = wl_cursor_theme_get_cursor(_glfw.wl.cursorTheme,
|
||||
"left_ptr");
|
||||
defaultCursor = wl_cursor_theme_get_cursor(_glfw.wl.cursorTheme, translateCursorShape(GLFW_ARROW_CURSOR));
|
||||
if (!defaultCursor)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"Wayland: Standard cursor not found");
|
||||
"Wayland: Standard arrow cursor not found");
|
||||
return;
|
||||
}
|
||||
_GLFWcursorWayland cursorWayland = {
|
||||
|
||||
Reference in New Issue
Block a user