mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-15 21:14:35 +02:00
Create the color manager object for a window surface
This commit is contained in:
1
glfw/wl_platform.h
vendored
1
glfw/wl_platform.h
vendored
@@ -172,6 +172,7 @@ typedef struct _GLFWwindowWayland
|
||||
bool hovered;
|
||||
bool transparent;
|
||||
struct wl_surface* surface;
|
||||
struct wp_color_management_surface_v1 *color_management;
|
||||
bool waiting_for_swap_to_commit;
|
||||
struct wl_egl_window* native;
|
||||
struct wl_callback* callback;
|
||||
|
||||
6
glfw/wl_window.c
vendored
6
glfw/wl_window.c
vendored
@@ -583,6 +583,9 @@ static bool createSurface(_GLFWwindow* window,
|
||||
window);
|
||||
|
||||
wl_surface_set_user_data(window->wl.surface, window);
|
||||
if (_glfw.wl.wp_color_manager_v1 != NULL) {
|
||||
window->wl.color_management = wp_color_manager_v1_get_surface(_glfw.wl.wp_color_manager_v1, window->wl.surface);
|
||||
}
|
||||
|
||||
// If we already have been notified of the primary monitor scale, assume
|
||||
// the window will be created on it and so avoid a rescale roundtrip in the common
|
||||
@@ -1513,6 +1516,9 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window)
|
||||
if (window->wl.layer_shell.zwlr_layer_surface_v1)
|
||||
zwlr_layer_surface_v1_destroy(window->wl.layer_shell.zwlr_layer_surface_v1);
|
||||
|
||||
if (window->wl.color_management)
|
||||
wp_color_management_surface_v1_destroy(window->wl.color_management);
|
||||
|
||||
if (window->wl.surface)
|
||||
wl_surface_destroy(window->wl.surface);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user