Add first try to add wl_shell to rootston

This commit is contained in:
emersion 2017-09-26 23:59:25 +02:00
parent 1ddda91b1b
commit ed9a43c213
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
6 changed files with 97 additions and 3 deletions

View file

@ -39,6 +39,7 @@ struct roots_desktop {
struct wl_listener output_add;
struct wl_listener output_remove;
struct wl_listener xdg_shell_v6_surface;
struct wl_listener wl_shell_surface;
};
struct roots_server;
@ -55,5 +56,6 @@ void output_add_notify(struct wl_listener *listener, void *data);
void output_remove_notify(struct wl_listener *listener, void *data);
void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data);
void handle_wl_shell_surface(struct wl_listener *listener, void *data);
#endif

View file

@ -7,20 +7,35 @@ struct wlr_wl_shell {
struct wl_global *wl_global;
struct wl_list wl_resources;
struct wl_list surfaces;
uint32_t ping_timeout;
struct {
struct wl_signal new_surface;
} events;
void *data;
};
struct wlr_wl_shell_surface {
struct wlr_wl_shell *shell;
struct wl_client *client;
struct wl_resource *surface;
struct wlr_texture *wlr_texture;
struct wl_list link;
uint32_t ping_serial;
struct wl_event_source *ping_timer;
struct {
struct wl_signal ping_timeout;
} events;
void *data;
};
struct wlr_wl_shell *wlr_wl_shell_create(struct wl_display *display);
void wlr_wl_shell_destroy(struct wlr_wl_shell *wlr_wl_shell);
void wlr_wl_shell_surface_ping(struct wlr_wl_shell_surface *surface);
#endif