diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-09-16 12:35:49 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-09-16 12:35:49 -0400 |
commit | 94f4f1878dd035ba1be6bf49ce7c41e45581ea94 (patch) | |
tree | e7389c433d9a7fd707181f64a17c953916d6d1fc /include | |
parent | c912de6390299aeadb871b52bd3ee8ae984d91ca (diff) |
xdg-surface-v6: implement ping
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/types/wlr_xdg_shell_v6.h | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/include/wlr/types/wlr_xdg_shell_v6.h b/include/wlr/types/wlr_xdg_shell_v6.h index 3e404b6d..f57dde10 100644 --- a/include/wlr/types/wlr_xdg_shell_v6.h +++ b/include/wlr/types/wlr_xdg_shell_v6.h @@ -5,8 +5,8 @@ struct wlr_xdg_shell_v6 { struct wl_global *wl_global; - struct wl_list wl_resources; - struct wl_list surfaces; + struct wl_list clients; + uint32_t ping_timeout; struct { struct wl_signal new_surface; @@ -15,6 +15,19 @@ struct wlr_xdg_shell_v6 { void *data; }; +struct wlr_xdg_client_v6 { + struct wlr_xdg_shell_v6 *shell; + struct wl_resource *resource; + struct wl_client *client; + struct wl_list surfaces; + + struct wl_list link; // wlr_xdg_shell_v6::clients + + uint32_t ping_serial; + struct wl_event_source *ping_timer; +}; + + enum wlr_xdg_surface_v6_role { WLR_XDG_SURFACE_V6_ROLE_NONE, WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL, @@ -54,11 +67,10 @@ struct wlr_xdg_surface_v6_configure { }; struct wlr_xdg_surface_v6 { - struct wl_client *client; + struct wlr_xdg_client_v6 *client; struct wl_resource *resource; struct wlr_surface *surface; - struct wlr_xdg_shell_v6 *shell; - struct wl_list link; + struct wl_list link; // wlr_xdg_client_v6::surfaces enum wlr_xdg_surface_v6_role role; struct wlr_xdg_toplevel_v6 *toplevel_state; @@ -80,6 +92,7 @@ struct wlr_xdg_surface_v6 { struct wl_signal commit; struct wl_signal destroy; struct wl_signal ack_configure; + struct wl_signal ping_timeout; struct wl_signal request_minimize; struct wl_signal request_move; @@ -118,6 +131,12 @@ struct wlr_xdg_shell_v6 *wlr_xdg_shell_v6_create(struct wl_display *display); void wlr_xdg_shell_v6_destroy(struct wlr_xdg_shell_v6 *xdg_shell); /** + * Send a ping to the surface. If the surface does not respond in a reasonable + * amount of time, the ping_timeout event will be emitted. + */ +void wlr_xdg_surface_v6_ping(struct wlr_xdg_surface_v6 *surface); + +/** * Request that this toplevel surface be the given size. */ void wlr_xdg_toplevel_v6_set_size(struct wlr_xdg_surface_v6 *surface, |