wayland: Update the color management protocol
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled

No functional changes, just minor updates to track the latest upstream version.
This commit is contained in:
Frank Praznik
2025-12-15 13:47:07 -05:00
parent db84b948f9
commit 9092ddff3c
4 changed files with 247 additions and 137 deletions

View File

@@ -236,9 +236,9 @@ static void image_description_handle_failed(void *data,
}
}
static void image_description_handle_ready(void *data,
struct wp_image_description_v1 *wp_image_description_v1,
uint32_t identity)
static void image_description_handle_ready2(void *data,
struct wp_image_description_v1 *wp_image_description_v1,
uint32_t identity_hi, uint32_t identity_lo)
{
Wayland_ColorInfoState *state = (Wayland_ColorInfoState *)data;
@@ -263,9 +263,17 @@ static void image_description_handle_ready(void *data,
}
}
static void image_description_handle_ready(void *data,
struct wp_image_description_v1 *wp_image_description_v1,
uint32_t identity)
{
image_description_handle_ready2(data, wp_image_description_v1, 0, identity);
}
static const struct wp_image_description_v1_listener image_description_listener = {
image_description_handle_failed,
image_description_handle_ready
image_description_handle_ready,
image_description_handle_ready2
};
void Wayland_GetColorInfoForWindow(SDL_WindowData *window_data, bool defer_event_processing)

View File

@@ -1331,7 +1331,7 @@ static void handle_registry_global(void *data, struct wl_registry *registry, uin
} else if (SDL_strcmp(interface, "frog_color_management_factory_v1") == 0) {
d->frog_color_management_factory_v1 = wl_registry_bind(d->registry, id, &frog_color_management_factory_v1_interface, 1);
} else if (SDL_strcmp(interface, "wp_color_manager_v1") == 0) {
d->wp_color_manager_v1 = wl_registry_bind(d->registry, id, &wp_color_manager_v1_interface, 1);
d->wp_color_manager_v1 = wl_registry_bind(d->registry, id, &wp_color_manager_v1_interface, SDL_min(version, 2));
Wayland_InitColorManager(d);
} else if (SDL_strcmp(interface, "wp_pointer_warp_v1") == 0) {
d->wp_pointer_warp_v1 = wl_registry_bind(d->registry, id, &wp_pointer_warp_v1_interface, 1);

View File

@@ -1706,16 +1706,25 @@ static const struct frog_color_managed_surface_listener frog_surface_listener =
frog_preferred_metadata_handler
};
static void handle_surface_feedback_preferred_changed(void *data,
struct wp_color_management_surface_feedback_v1 *wp_color_management_surface_feedback_v1,
uint32_t identity)
static void handle_surface_feedback_preferred_changed2(void *data,
struct wp_color_management_surface_feedback_v1 *wp_color_management_surface_feedback_v1,
uint32_t identity_hi, uint32_t identity_lo)
{
SDL_WindowData *wind = (SDL_WindowData *)data;
Wayland_GetColorInfoForWindow(wind, false);
}
static void handle_surface_feedback_preferred_changed(void *data,
struct wp_color_management_surface_feedback_v1 *wp_color_management_surface_feedback_v1,
uint32_t identity)
{
handle_surface_feedback_preferred_changed2(data, wp_color_management_surface_feedback_v1, 0, identity);
}
static const struct wp_color_management_surface_feedback_v1_listener color_management_surface_feedback_listener = {
handle_surface_feedback_preferred_changed
handle_surface_feedback_preferred_changed,
handle_surface_feedback_preferred_changed2
};
static void Wayland_SetKeyboardFocus(SDL_Window *window, bool set_focus)

File diff suppressed because it is too large Load Diff