Make wlr_wl_shell_create work like xdg

Also:
- rename wlr_xdg_shell_v6_init to create as that is what it does
- free wlr_xdg_shell on failure to create wl_global, the struct
is not initialized enough to call destroy at that point
This commit is contained in:
Dominique Martinet 2017-08-15 15:33:54 +02:00
parent d49edc8243
commit f9b55dfa95
5 changed files with 21 additions and 13 deletions

View file

@ -19,8 +19,7 @@ struct wlr_wl_shell_surface {
};
void wlr_wl_shell_init(struct wlr_wl_shell *wlr_wl_shell,
struct wl_display *display);
struct wlr_wl_shell *wlr_wl_shell_create(struct wl_display *display);
void wlr_wl_shell_destroy(struct wlr_wl_shell *wlr_wl_shell);
#endif

View file

@ -18,7 +18,7 @@ struct wlr_xdg_surface_v6 {
void *data;
};
struct wlr_xdg_shell_v6 *wlr_xdg_shell_v6_init(struct wl_display *display);
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);
#endif