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 | |
parent | cf1ed777ae56f677bcc0f832c52c04dc65be18ce (diff) |
Revert "merge sway master"
This reverts commit 7460d9f565092836f81b917a040caff57142d91a.
Diffstat (limited to 'swaybar')
-rw-r--r-- | swaybar/bar.c | 10 | ||||
-rw-r--r-- | swaybar/render.c | 9 | ||||
-rw-r--r-- | swaybar/tray/item.c | 5 |
3 files changed, 7 insertions, 17 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); diff --git a/swaybar/render.c b/swaybar/render.c index 7e2f97b7..dcde6b9e 100644 --- a/swaybar/render.c +++ b/swaybar/render.c @@ -831,15 +831,6 @@ void render_frame(struct swaybar_output *output) { wl_surface_damage(output->surface, 0, 0, output->width, output->height); - uint32_t bg_alpha = ctx.background_color & 0xFF; - if (bg_alpha == 0xFF) { - struct wl_region *region = - wl_compositor_create_region(output->bar->compositor); - wl_region_add(region, 0, 0, INT32_MAX, INT32_MAX); - wl_surface_set_opaque_region(output->surface, region); - wl_region_destroy(region); - } - struct wl_callback *frame_callback = wl_surface_frame(output->surface); wl_callback_add_listener(frame_callback, &output_frame_listener, output); output->frame_scheduled = true; diff --git a/swaybar/tray/item.c b/swaybar/tray/item.c index 0cb5ee9d..6d4b17bf 100644 --- a/swaybar/tray/item.c +++ b/swaybar/tray/item.c @@ -466,11 +466,6 @@ uint32_t render_sni(cairo_t *cairo, struct swaybar_output *output, double *x, sni->target_size = target_size; } - // Passive - if (sni->status && sni->status[0] == 'P') { - return 0; - } - int icon_size; cairo_surface_t *icon; if (sni->icon) { |