Check for surface in display_handle_geometry

Fixes #23

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
ArenM 2022-06-13 18:04:00 -04:00 committed by Maarten van Gompel
parent 94ca075563
commit 7be30a6a56

8
main.c
View File

@ -271,9 +271,11 @@ display_handle_geometry(void *data, struct wl_output *wl_output, int x, int y,
keyboard.layout = &keyboard.layouts[layer];
keyboard.prevlayout = keyboard.layout;
zwlr_layer_surface_v1_set_size(layer_surface, 0, height);
zwlr_layer_surface_v1_set_exclusive_zone(layer_surface, height);
wl_surface_commit(draw_surf.surf);
if (layer_surface) {
zwlr_layer_surface_v1_set_size(layer_surface, 0, height);
zwlr_layer_surface_v1_set_exclusive_zone(layer_surface, height);
wl_surface_commit(draw_surf.surf);
}
}
static void