mirror of
https://github.com/labwc/labwc.git
synced 2025-11-06 13:29:58 -05:00
common: Add additional memory utilities (xzalloc() etc.)
This commit is contained in:
parent
b89f7bfc0d
commit
cb40cdc36c
35 changed files with 193 additions and 167 deletions
|
|
@ -1,4 +1,5 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
#include "common/mem.h"
|
||||
#include "labwc.h"
|
||||
|
||||
struct xdg_deco {
|
||||
|
|
@ -43,10 +44,7 @@ xdg_toplevel_decoration(struct wl_listener *listener, void *data)
|
|||
struct server *server =
|
||||
wl_container_of(listener, server, xdg_toplevel_decoration);
|
||||
struct wlr_xdg_toplevel_decoration_v1 *wlr_decoration = data;
|
||||
struct xdg_deco *xdg_deco = calloc(1, sizeof(struct xdg_deco));
|
||||
if (!xdg_deco) {
|
||||
return;
|
||||
}
|
||||
struct xdg_deco *xdg_deco = xzalloc(sizeof(struct xdg_deco));
|
||||
xdg_deco->wlr_decoration = wlr_decoration;
|
||||
xdg_deco->server = server;
|
||||
xdg_deco->view = wlr_decoration->surface->data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue