mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-22 09:59:48 +01:00
content-type-v1: add version param to wlr_content_type_manager_v1_create()
This commit is contained in:
parent
3ef68a4842
commit
bf623ec782
2 changed files with 5 additions and 4 deletions
|
@ -29,7 +29,7 @@ struct wlr_content_type_manager_v1 {
|
|||
};
|
||||
|
||||
struct wlr_content_type_manager_v1 *wlr_content_type_manager_v1_create(
|
||||
struct wl_display *display);
|
||||
struct wl_display *display, uint32_t version);
|
||||
enum wp_content_type_v1_type wlr_surface_get_content_type_v1(
|
||||
struct wlr_content_type_manager_v1 *manager, struct wlr_surface *surface);
|
||||
|
||||
|
|
|
@ -157,15 +157,16 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
}
|
||||
|
||||
struct wlr_content_type_manager_v1 *wlr_content_type_manager_v1_create(
|
||||
struct wl_display *display) {
|
||||
struct wl_display *display, uint32_t version) {
|
||||
assert(version <= CONTENT_TYPE_VERSION);
|
||||
|
||||
struct wlr_content_type_manager_v1 *manager = calloc(1, sizeof(*manager));
|
||||
if (manager == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
manager->global = wl_global_create(display,
|
||||
&wp_content_type_manager_v1_interface, CONTENT_TYPE_VERSION,
|
||||
manager, manager_bind);
|
||||
&wp_content_type_manager_v1_interface, version, manager, manager_bind);
|
||||
if (manager->global == NULL) {
|
||||
free(manager);
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in a new issue