Start work on fractional scale support for Wayland

Register the interface on startup
This commit is contained in:
Kovid Goyal
2024-03-21 11:47:48 +05:30
parent 7e12cc57c6
commit 2b6edbccbc
3 changed files with 9 additions and 1 deletions

5
glfw/wl_init.c vendored
View File

@@ -726,6 +726,9 @@ static void registryHandleGlobal(void* data UNUSED,
else if (is(wp_cursor_shape_manager_v1)) {
_glfw.wl.wp_cursor_shape_manager_v1 = wl_registry_bind(registry, name, &wp_cursor_shape_manager_v1_interface, 1);
}
else if (is(wp_fractional_scale_manager_v1)) {
_glfw.wl.wp_fractional_scale_manager_v1 = wl_registry_bind(registry, name, &wp_fractional_scale_manager_v1_interface, 1);
}
#undef is
}
@@ -962,6 +965,8 @@ void _glfwPlatformTerminate(void)
xdg_activation_v1_destroy(_glfw.wl.xdg_activation_v1);
if (_glfw.wl.wp_cursor_shape_manager_v1)
wp_cursor_shape_manager_v1_destroy(_glfw.wl.wp_cursor_shape_manager_v1);
if (_glfw.wl.wp_fractional_scale_manager_v1)
wp_fractional_scale_manager_v1_destroy(_glfw.wl.wp_fractional_scale_manager_v1);
if (_glfw.wl.registry)
wl_registry_destroy(_glfw.wl.registry);