libweston-desktop: Implement xdg_shell_v6

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Giulio Camuffo <giulio.camuffo@kdab.com>

Differential Revision: https://phabricator.freedesktop.org/D1210
This commit is contained in:
Quentin Glidic
2016-08-12 10:41:37 +02:00
committed by Jonas Ådahl
parent 5ac91a15e8
commit 9c5dd7ef70
6 changed files with 1258 additions and 1 deletions
+10
View File
@@ -40,6 +40,7 @@ struct weston_desktop {
struct weston_compositor *compositor;
struct weston_desktop_api api;
void *user_data;
struct wl_global *xdg_shell_v6;
struct wl_global *xdg_shell_v5;
struct wl_global *wl_shell;
};
@@ -69,6 +70,13 @@ weston_desktop_create(struct weston_compositor *compositor,
MIN(sizeof(struct weston_desktop_api), api->struct_size);
memcpy(&desktop->api, api, desktop->api.struct_size);
desktop->xdg_shell_v6 =
weston_desktop_xdg_shell_v6_create(desktop, display);
if (desktop->xdg_shell_v6 == NULL) {
weston_desktop_destroy(desktop);
return NULL;
}
desktop->xdg_shell_v5 =
weston_desktop_xdg_shell_v5_create(desktop, display);
if (desktop->xdg_shell_v5 == NULL) {
@@ -98,6 +106,8 @@ weston_desktop_destroy(struct weston_desktop *desktop)
wl_global_destroy(desktop->wl_shell);
if (desktop->xdg_shell_v5 != NULL)
wl_global_destroy(desktop->xdg_shell_v5);
if (desktop->xdg_shell_v6 != NULL)
wl_global_destroy(desktop->xdg_shell_v6);
free(desktop);
}
File diff suppressed because it is too large Load Diff