diff options
author | emersion <contact@emersion.fr> | 2018-06-30 12:57:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-30 12:57:48 +0100 |
commit | 167105e6069d2dd66cd2d472c2a6b67703838125 (patch) | |
tree | e6626f03fdd94c7832c4b5cb3b97e2a61cf6602e /rootston | |
parent | 63eb720871004219826f16e0a79a0014ac5516e4 (diff) | |
parent | 0c2a64df18f8740ab795fb2970d1954a8aac34b1 (diff) |
Merge pull request #1101 from martinetd/static-analysis
Static analysis fixes
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/layer_shell.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rootston/layer_shell.c b/rootston/layer_shell.c index db0aeb59..2adf11a5 100644 --- a/rootston/layer_shell.c +++ b/rootston/layer_shell.c @@ -381,12 +381,6 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) { layer_surface->client_pending.margin.bottom, layer_surface->client_pending.margin.left); - struct roots_layer_surface *roots_surface = - calloc(1, sizeof(struct roots_layer_surface)); - if (!roots_surface) { - return; - } - if (!layer_surface->output) { struct roots_input *input = desktop->server->input; struct roots_seat *seat = input_last_active_seat(input); @@ -409,6 +403,12 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) { } } + struct roots_layer_surface *roots_surface = + calloc(1, sizeof(struct roots_layer_surface)); + if (!roots_surface) { + return; + } + roots_surface->surface_commit.notify = handle_surface_commit; wl_signal_add(&layer_surface->surface->events.commit, &roots_surface->surface_commit); |