mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 22:25:58 +01:00
wlr_xdg_activation_v1: add new_token event
This commit is contained in:
parent
097ea84cda
commit
f8e70af318
2 changed files with 4 additions and 2 deletions
|
@ -46,6 +46,7 @@ struct wlr_xdg_activation_v1 {
|
||||||
struct {
|
struct {
|
||||||
struct wl_signal destroy;
|
struct wl_signal destroy;
|
||||||
struct wl_signal request_activate; // struct wlr_xdg_activation_v1_request_activate_event
|
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;
|
} events;
|
||||||
|
|
||||||
// private state
|
// private state
|
||||||
|
|
|
@ -127,9 +127,9 @@ static void token_handle_commit(struct wl_client *client,
|
||||||
return;
|
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;
|
return;
|
||||||
|
|
||||||
|
@ -361,6 +361,7 @@ struct wlr_xdg_activation_v1 *wlr_xdg_activation_v1_create(
|
||||||
wl_list_init(&activation->tokens);
|
wl_list_init(&activation->tokens);
|
||||||
wl_signal_init(&activation->events.destroy);
|
wl_signal_init(&activation->events.destroy);
|
||||||
wl_signal_init(&activation->events.request_activate);
|
wl_signal_init(&activation->events.request_activate);
|
||||||
|
wl_signal_init(&activation->events.new_token);
|
||||||
|
|
||||||
activation->global = wl_global_create(display,
|
activation->global = wl_global_create(display,
|
||||||
&xdg_activation_v1_interface, XDG_ACTIVATION_V1_VERSION, activation,
|
&xdg_activation_v1_interface, XDG_ACTIVATION_V1_VERSION, activation,
|
||||||
|
|
Loading…
Reference in a new issue