mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 06:14:35 +00:00
Add window handle checks for glfwSetWindowIcon to Win32 and X11.
This commit is contained in:
parent
6381d7ed20
commit
6cd800a54d
@ -1520,6 +1520,14 @@ void _glfwSetWindowTitleWin32(_GLFWwindow* window, const char* title)
|
||||
void _glfwSetWindowIconWin32(_GLFWwindow* window, int count, const GLFWimage* images)
|
||||
{
|
||||
HICON bigIcon = NULL, smallIcon = NULL;
|
||||
|
||||
if (window == NULL)
|
||||
{
|
||||
|
||||
_glfwInputError(GLFW_FEATURE_UNAVAILABLE,
|
||||
"Win32: Requires a valid window handle to set the icon. There is no application icon to set.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (count)
|
||||
{
|
||||
|
@ -1899,7 +1899,7 @@ void _glfwSetWindowIconWayland(_GLFWwindow* window,
|
||||
int count, const GLFWimage* images)
|
||||
{
|
||||
_glfwInputError(GLFW_FEATURE_UNAVAILABLE,
|
||||
"Wayland: The platform does not support setting the window icon");
|
||||
"Wayland: The platform does not support setting the window or application icon");
|
||||
}
|
||||
|
||||
void _glfwGetWindowPosWayland(_GLFWwindow* window, int* xpos, int* ypos)
|
||||
|
@ -2104,6 +2104,14 @@ void _glfwSetWindowTitleX11(_GLFWwindow* window, const char* title)
|
||||
|
||||
void _glfwSetWindowIconX11(_GLFWwindow* window, int count, const GLFWimage* images)
|
||||
{
|
||||
if (window == NULL)
|
||||
{
|
||||
|
||||
_glfwInputError(GLFW_FEATURE_UNAVAILABLE,
|
||||
"X11: Requires a valid window handle to set the icon. There is no application icon to set.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (count)
|
||||
{
|
||||
int longCount = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user