mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +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)
|
if (!cursor)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||||
"Wayland: Standard cursor not found");
|
"Wayland: Standard cursor %s not found", name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// TODO: handle animated cursors too.
|
// 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
|
// Translates a GLFW standard cursor to a theme cursor name
|
||||||
//
|
//
|
||||||
static char *translateCursorShape(int shape)
|
static const char *translateCursorShape(int shape)
|
||||||
{
|
{
|
||||||
switch (shape)
|
switch (shape)
|
||||||
{
|
{
|
||||||
@@ -1555,12 +1555,11 @@ void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
|
|||||||
setCursorImage(&cursor->wl);
|
setCursorImage(&cursor->wl);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
defaultCursor = wl_cursor_theme_get_cursor(_glfw.wl.cursorTheme,
|
defaultCursor = wl_cursor_theme_get_cursor(_glfw.wl.cursorTheme, translateCursorShape(GLFW_ARROW_CURSOR));
|
||||||
"left_ptr");
|
|
||||||
if (!defaultCursor)
|
if (!defaultCursor)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||||
"Wayland: Standard cursor not found");
|
"Wayland: Standard arrow cursor not found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_GLFWcursorWayland cursorWayland = {
|
_GLFWcursorWayland cursorWayland = {
|
||||||
|
|||||||
Reference in New Issue
Block a user