mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-28 19:21:38 +02:00
Improve handling of output names
Now can use panel --output-name list to list available outputs. Also, --output-name works on macOS
This commit is contained in:
15
glfw/monitor.c
vendored
15
glfw/monitor.c
vendored
@@ -186,7 +186,8 @@ void _glfwFreeMonitor(_GLFWmonitor* monitor)
|
||||
_glfwFreeGammaArrays(&monitor->currentRamp);
|
||||
|
||||
free(monitor->modes);
|
||||
free(monitor->name);
|
||||
free((void*)monitor->name);
|
||||
free((void*)monitor->description);
|
||||
free(monitor);
|
||||
}
|
||||
|
||||
@@ -393,9 +394,19 @@ GLFWAPI const char* glfwGetMonitorName(GLFWmonitor* handle)
|
||||
assert(monitor != NULL);
|
||||
|
||||
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
|
||||
return monitor->name;
|
||||
return monitor->name ? monitor->name : "";
|
||||
}
|
||||
|
||||
GLFWAPI const char* glfwGetMonitorDescription(GLFWmonitor* handle)
|
||||
{
|
||||
_GLFWmonitor* monitor = (_GLFWmonitor*) handle;
|
||||
assert(monitor != NULL);
|
||||
|
||||
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
|
||||
return monitor->description ? monitor->description : "";
|
||||
}
|
||||
|
||||
|
||||
GLFWAPI void glfwSetMonitorUserPointer(GLFWmonitor* handle, void* pointer)
|
||||
{
|
||||
_GLFWmonitor* monitor = (_GLFWmonitor*) handle;
|
||||
|
||||
Reference in New Issue
Block a user