wlr_xdg_activation_v1: add new_token event

This commit is contained in:
Ronan Pigott 2022-11-27 20:32:25 -07:00
parent 097ea84cda
commit f8e70af318
2 changed files with 4 additions and 2 deletions

View File

@ -46,6 +46,7 @@ struct wlr_xdg_activation_v1 {
struct {
struct wl_signal destroy;
struct wl_signal request_activate; // struct wlr_xdg_activation_v1_request_activate_event
struct wl_signal new_token; // struct wlr_xdg_activation_token_v1
} events;
// private state

View File

@ -127,9 +127,9 @@ static void token_handle_commit(struct wl_client *client,
return;
}
xdg_activation_token_v1_send_done(token_resource, token->token);
wl_signal_emit_mutable(&token->activation->events.new_token, token);
// TODO: consider emitting a new_token event
xdg_activation_token_v1_send_done(token_resource, token->token);
return;
@ -361,6 +361,7 @@ struct wlr_xdg_activation_v1 *wlr_xdg_activation_v1_create(
wl_list_init(&activation->tokens);
wl_signal_init(&activation->events.destroy);
wl_signal_init(&activation->events.request_activate);
wl_signal_init(&activation->events.new_token);
activation->global = wl_global_create(display,
&xdg_activation_v1_interface, XDG_ACTIVATION_V1_VERSION, activation,