From f9b55dfa952f3e405399cabf2963b2df376f044d Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Tue, 15 Aug 2017 15:33:54 +0200 Subject: 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 --- include/wlr/types/wlr_wl_shell.h | 3 +-- include/wlr/types/wlr_xdg_shell_v6.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_wl_shell.h b/include/wlr/types/wlr_wl_shell.h index 80583ae9..a085711b 100644 --- a/include/wlr/types/wlr_wl_shell.h +++ b/include/wlr/types/wlr_wl_shell.h @@ -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 diff --git a/include/wlr/types/wlr_xdg_shell_v6.h b/include/wlr/types/wlr_xdg_shell_v6.h index 07380a96..41cf483a 100644 --- a/include/wlr/types/wlr_xdg_shell_v6.h +++ b/include/wlr/types/wlr_xdg_shell_v6.h @@ -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 -- cgit v1.2.3