mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 22:25:58 +01:00
data-control-v1: use new wlr_data_source API
This commit is contained in:
parent
0040f7089f
commit
703a160078
1 changed files with 3 additions and 4 deletions
|
@ -32,11 +32,10 @@ static void client_source_send(struct wlr_data_source *wlr_source,
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void client_source_cancel(struct wlr_data_source *wlr_source) {
|
static void client_source_destroy(struct wlr_data_source *wlr_source) {
|
||||||
struct client_data_source *source =
|
struct client_data_source *source =
|
||||||
client_data_source_from_source(wlr_source);
|
client_data_source_from_source(wlr_source);
|
||||||
zwlr_data_control_source_v1_send_cancelled(source->resource);
|
zwlr_data_control_source_v1_send_cancelled(source->resource);
|
||||||
wlr_data_source_finish(wlr_source);
|
|
||||||
// Make the resource inert
|
// Make the resource inert
|
||||||
wl_resource_set_user_data(source->resource, NULL);
|
wl_resource_set_user_data(source->resource, NULL);
|
||||||
free(source);
|
free(source);
|
||||||
|
@ -44,7 +43,7 @@ static void client_source_cancel(struct wlr_data_source *wlr_source) {
|
||||||
|
|
||||||
static const struct wlr_data_source_impl client_source_impl = {
|
static const struct wlr_data_source_impl client_source_impl = {
|
||||||
.send = client_source_send,
|
.send = client_source_send,
|
||||||
.cancel = client_source_cancel,
|
.destroy = client_source_destroy,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct zwlr_data_control_source_v1_interface source_impl;
|
static const struct zwlr_data_control_source_v1_interface source_impl;
|
||||||
|
@ -101,7 +100,7 @@ static void source_handle_resource_destroy(struct wl_resource *resource) {
|
||||||
if (source == NULL) {
|
if (source == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
wlr_data_source_cancel(&source->source);
|
wlr_data_source_destroy(&source->source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue