shell: add private surface struct
Add a pointer to wlsc_surface for shell-private data. This is a
temporary solution.
Add struct shell_surface, where you can add any shell-private data
members related to a wlsc_surface. The getter function takes care of
creating the private data if it does not exist yet.
Not used anywhere yet.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
diff --git a/compositor/compositor.c b/compositor/compositor.c
index fe123f8..0ae71b6 100644
--- a/compositor/compositor.c
+++ b/compositor/compositor.c
@@ -248,7 +248,7 @@
{
struct wlsc_surface *surface;
- surface = malloc(sizeof *surface);
+ surface = calloc(1, sizeof *surface);
if (surface == NULL)
return NULL;