diff options
author | Will McKinnon <[email protected]> | 2022-08-15 00:54:07 -0400 |
---|---|---|
committer | Will McKinnon <[email protected]> | 2022-08-15 00:54:07 -0400 |
commit | 7b530bf4487f36273938ffd7236dad8a7629790a (patch) | |
tree | 0c5cdceb7fbda31530d2d32388db8e27f67748a0 /swaybar/bar.c | |
parent | cf1ed777ae56f677bcc0f832c52c04dc65be18ce (diff) |
Revert "merge sway master"
This reverts commit 7460d9f565092836f81b917a040caff57142d91a.
Diffstat (limited to 'swaybar/bar.c')
-rw-r--r-- | swaybar/bar.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/swaybar/bar.c b/swaybar/bar.c index 5e4ebd97..6ffdc9b4 100644 --- a/swaybar/bar.c +++ b/swaybar/bar.c @@ -51,6 +51,9 @@ static void swaybar_output_free(struct swaybar_output *output) { if (output->surface != NULL) { wl_surface_destroy(output->surface); } + if (output->input_region != NULL) { + wl_region_destroy(output->input_region); + } wl_output_destroy(output->output); destroy_buffer(&output->buffers[0]); destroy_buffer(&output->buffers[1]); @@ -110,9 +113,10 @@ static void add_layer_surface(struct swaybar_output *output) { if (overlay) { // Empty input region - struct wl_region *region = wl_compositor_create_region(bar->compositor); - wl_surface_set_input_region(output->surface, region); - wl_region_destroy(region); + output->input_region = wl_compositor_create_region(bar->compositor); + assert(output->input_region); + + wl_surface_set_input_region(output->surface, output->input_region); } zwlr_layer_surface_v1_set_anchor(output->layer_surface, config->position); |