Update C sources
This commit is contained in:
parent
aabc97d1c2
commit
607adace28
71 changed files with 28187 additions and 15292 deletions
94
raylib/external/glfw/src/wl_window.c
vendored
94
raylib/external/glfw/src/wl_window.c
vendored
|
@ -246,10 +246,10 @@ static void createDecorations(_GLFWwindow* window)
|
|||
|
||||
static void destroyDecoration(_GLFWdecorationWayland* decoration)
|
||||
{
|
||||
if (decoration->surface)
|
||||
wl_surface_destroy(decoration->surface);
|
||||
if (decoration->subsurface)
|
||||
wl_subsurface_destroy(decoration->subsurface);
|
||||
if (decoration->surface)
|
||||
wl_surface_destroy(decoration->surface);
|
||||
if (decoration->viewport)
|
||||
wp_viewport_destroy(decoration->viewport);
|
||||
decoration->surface = NULL;
|
||||
|
@ -1242,26 +1242,39 @@ int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape)
|
|||
const char* name = NULL;
|
||||
|
||||
// Try the XDG names first
|
||||
if (shape == GLFW_ARROW_CURSOR)
|
||||
name = "default";
|
||||
else if (shape == GLFW_IBEAM_CURSOR)
|
||||
name = "text";
|
||||
else if (shape == GLFW_CROSSHAIR_CURSOR)
|
||||
name = "crosshair";
|
||||
else if (shape == GLFW_POINTING_HAND_CURSOR)
|
||||
name = "pointer";
|
||||
else if (shape == GLFW_RESIZE_EW_CURSOR)
|
||||
name = "ew-resize";
|
||||
else if (shape == GLFW_RESIZE_NS_CURSOR)
|
||||
name = "ns-resize";
|
||||
else if (shape == GLFW_RESIZE_NWSE_CURSOR)
|
||||
name = "nwse-resize";
|
||||
else if (shape == GLFW_RESIZE_NESW_CURSOR)
|
||||
name = "nesw-resize";
|
||||
else if (shape == GLFW_RESIZE_ALL_CURSOR)
|
||||
name = "all-scroll";
|
||||
else if (shape == GLFW_NOT_ALLOWED_CURSOR)
|
||||
name = "not-allowed";
|
||||
switch (shape)
|
||||
{
|
||||
case GLFW_ARROW_CURSOR:
|
||||
name = "default";
|
||||
break;
|
||||
case GLFW_IBEAM_CURSOR:
|
||||
name = "text";
|
||||
break;
|
||||
case GLFW_CROSSHAIR_CURSOR:
|
||||
name = "crosshair";
|
||||
break;
|
||||
case GLFW_POINTING_HAND_CURSOR:
|
||||
name = "pointer";
|
||||
break;
|
||||
case GLFW_RESIZE_EW_CURSOR:
|
||||
name = "ew-resize";
|
||||
break;
|
||||
case GLFW_RESIZE_NS_CURSOR:
|
||||
name = "ns-resize";
|
||||
break;
|
||||
case GLFW_RESIZE_NWSE_CURSOR:
|
||||
name = "nwse-resize";
|
||||
break;
|
||||
case GLFW_RESIZE_NESW_CURSOR:
|
||||
name = "nesw-resize";
|
||||
break;
|
||||
case GLFW_RESIZE_ALL_CURSOR:
|
||||
name = "all-scroll";
|
||||
break;
|
||||
case GLFW_NOT_ALLOWED_CURSOR:
|
||||
name = "not-allowed";
|
||||
break;
|
||||
}
|
||||
|
||||
cursor->wl.cursor = wl_cursor_theme_get_cursor(_glfw.wl.cursorTheme, name);
|
||||
|
||||
|
@ -1274,25 +1287,26 @@ int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape)
|
|||
if (!cursor->wl.cursor)
|
||||
{
|
||||
// Fall back to the core X11 names
|
||||
if (shape == GLFW_ARROW_CURSOR)
|
||||
name = "left_ptr";
|
||||
else if (shape == GLFW_IBEAM_CURSOR)
|
||||
name = "xterm";
|
||||
else if (shape == GLFW_CROSSHAIR_CURSOR)
|
||||
name = "crosshair";
|
||||
else if (shape == GLFW_POINTING_HAND_CURSOR)
|
||||
name = "hand2";
|
||||
else if (shape == GLFW_RESIZE_EW_CURSOR)
|
||||
name = "sb_h_double_arrow";
|
||||
else if (shape == GLFW_RESIZE_NS_CURSOR)
|
||||
name = "sb_v_double_arrow";
|
||||
else if (shape == GLFW_RESIZE_ALL_CURSOR)
|
||||
name = "fleur";
|
||||
else
|
||||
switch (shape)
|
||||
{
|
||||
_glfwInputError(GLFW_CURSOR_UNAVAILABLE,
|
||||
"Wayland: Standard cursor shape unavailable");
|
||||
return GLFW_FALSE;
|
||||
case GLFW_ARROW_CURSOR:
|
||||
name = "left_ptr";
|
||||
case GLFW_IBEAM_CURSOR:
|
||||
name = "xterm";
|
||||
case GLFW_CROSSHAIR_CURSOR:
|
||||
name = "crosshair";
|
||||
case GLFW_POINTING_HAND_CURSOR:
|
||||
name = "hand2";
|
||||
case GLFW_RESIZE_EW_CURSOR:
|
||||
name = "sb_h_double_arrow";
|
||||
case GLFW_RESIZE_NS_CURSOR:
|
||||
name = "sb_v_double_arrow";
|
||||
case GLFW_RESIZE_ALL_CURSOR:
|
||||
name = "fleur";
|
||||
default:
|
||||
_glfwInputError(GLFW_CURSOR_UNAVAILABLE,
|
||||
"Wayland: Standard cursor shape unavailable");
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
cursor->wl.cursor = wl_cursor_theme_get_cursor(_glfw.wl.cursorTheme, name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue