mirror of
https://github.com/glfw/glfw.git
synced 2025-02-21 16:09:13 +00:00
Wayland error reporting work.
This commit is contained in:
parent
ede7a585bf
commit
420f3f7840
@ -102,7 +102,11 @@ int _glfwPlatformInit(void)
|
|||||||
{
|
{
|
||||||
_glfw.wl.display = wl_display_connect(NULL);
|
_glfw.wl.display = wl_display_connect(NULL);
|
||||||
if (!_glfw.wl.display)
|
if (!_glfw.wl.display)
|
||||||
|
{
|
||||||
|
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||||
|
"Wayland: Failed to connect to display");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
_glfw.wl.registry = wl_display_get_registry(_glfw.wl.display);
|
_glfw.wl.registry = wl_display_get_registry(_glfw.wl.display);
|
||||||
wl_registry_add_listener(_glfw.wl.registry, ®istryListener, NULL);
|
wl_registry_add_listener(_glfw.wl.registry, ®istryListener, NULL);
|
||||||
|
@ -123,7 +123,7 @@ void _glfwAddOutput(uint32_t name, uint32_t version)
|
|||||||
if (version < 2)
|
if (version < 2)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||||
"Unsupported wl_output interface version");
|
"Wayland: Unsupported output interface version");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos)
|
|||||||
// to (0, 0)
|
// to (0, 0)
|
||||||
|
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||||
"Wayland does not allow manual window positioning");
|
"Wayland: Window position retreival not supported");
|
||||||
|
|
||||||
if (xpos)
|
if (xpos)
|
||||||
*xpos = 0;
|
*xpos = 0;
|
||||||
@ -156,7 +156,7 @@ void _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos)
|
|||||||
// A Wayland client can not set its position, so just warn
|
// A Wayland client can not set its position, so just warn
|
||||||
|
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||||
"Wayland does not allow manual window positioning");
|
"Wayland: Window position setting not supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)
|
void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)
|
||||||
@ -253,7 +253,7 @@ void _glfwPlatformSetCursorPos(_GLFWwindow* window, double x, double y)
|
|||||||
{
|
{
|
||||||
// A Wayland client can not set the cursor position
|
// A Wayland client can not set the cursor position
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||||
"Wayland does not allow cursor positioning");
|
"Wayland: Cursor position setting not supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
void _glfwPlatformApplyCursorMode(_GLFWwindow* window)
|
void _glfwPlatformApplyCursorMode(_GLFWwindow* window)
|
||||||
|
Loading…
Reference in New Issue
Block a user