diff --git a/meson.build b/meson.build index 96e75f3c..c6ebdbd7 100644 --- a/meson.build +++ b/meson.build @@ -11,7 +11,7 @@ project( ], ) -original_version = '1.10.0' +original_version = '1.10.1' add_project_arguments( [ diff --git a/sway/config/output.c b/sway/config/output.c index f8922ea5..9fb3a12a 100644 --- a/sway/config/output.c +++ b/sway/config/output.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -773,7 +774,7 @@ static bool search_render_format(struct search_context *ctx, size_t output_idx) } const struct wlr_drm_format_set *primary_formats = - wlr_output_get_primary_formats(wlr_output, WLR_BUFFER_CAP_DMABUF); + wlr_output_get_primary_formats(wlr_output, server.allocator->buffer_caps); enum render_bit_depth needed_bits = RENDER_BIT_DEPTH_8; if (cfg->config && cfg->config->render_bit_depth != RENDER_BIT_DEPTH_DEFAULT) { needed_bits = cfg->config->render_bit_depth; @@ -783,7 +784,8 @@ static bool search_render_format(struct search_context *ctx, size_t output_idx) if (needed_bits < format_bits) { continue; } - if (!wlr_drm_format_set_get(primary_formats, fmts[idx])) { + // If primary_formats is NULL, all formats are supported + if (primary_formats && !wlr_drm_format_set_get(primary_formats, fmts[idx])) { // This is not a supported format for this output continue; } @@ -1016,6 +1018,7 @@ void free_output_config(struct output_config *oc) { free(oc->name); free(oc->background); free(oc->background_option); + free(oc->background_fallback); wlr_color_transform_unref(oc->color_transform); free(oc); } diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c index c4ea1bef..ad8b12cc 100644 --- a/sway/desktop/layer_shell.c +++ b/sway/desktop/layer_shell.c @@ -330,6 +330,7 @@ static void handle_node_destroy(struct wl_listener *listener, void *data) { wl_list_remove(&layer->unmap.link); wl_list_remove(&layer->surface_commit.link); wl_list_remove(&layer->node_destroy.link); + wl_list_remove(&layer->new_popup.link); wl_list_remove(&layer->output_destroy.link); layer->layer_surface->data = NULL; diff --git a/sway/sway.5.scd b/sway/sway.5.scd index a0d8b0cf..8a0e4067 100644 --- a/sway/sway.5.scd +++ b/sway/sway.5.scd @@ -110,9 +110,9 @@ They are expected to be used with *bindsym* or at runtime through *swaymsg*(1). *border* none|normal|csd|pixel [] Set border style for focused window. _normal_ includes a border of thickness _n_ and a title bar. _pixel_ is a border without title bar _n_ - pixels thick. Default is _normal_ with border thickness 2. _csd_ is short - for client-side-decorations, which allows the client to draw its own - decorations. + pixels thick. The title bar always shows in stacking or tabbed layouts. + _csd_ is short for client-side-decorations, which allows the client to draw + its own decorations. Default is _normal_ with border thickness 2. *border* toggle Cycles through the available border styles. diff --git a/swaybar/render.c b/swaybar/render.c index 879a4e42..13cfdc97 100644 --- a/swaybar/render.c +++ b/swaybar/render.c @@ -29,6 +29,7 @@ struct render_context { cairo_font_options_t *textaa_sharp; cairo_font_options_t *textaa_safe; uint32_t background_color; + bool has_transparency; }; static void choose_text_aa_mode(struct render_context *ctx, uint32_t fontcolor) { @@ -265,6 +266,7 @@ static uint32_t render_status_block(struct render_context *ctx, uint32_t bg_color = block->urgent ? config->colors.urgent_workspace.background : block->background; + ctx->has_transparency |= (bg_color & 0xFF) != 0xFF; if (bg_color) { render_sharp_rectangle(cairo, bg_color, x_pos, y_pos, block_width, render_height); @@ -574,6 +576,7 @@ static uint32_t render_binding_mode_indicator(struct render_context *ctx, cairo_set_operator(cairo, CAIRO_OPERATOR_SOURCE); cairo_set_source_u32(cairo, config->colors.binding_mode.background); ctx->background_color = config->colors.binding_mode.background; + ctx->has_transparency |= (config->colors.binding_mode.background & 0xFF) != 0xFF; cairo_rectangle(cairo, x, 0, width, height); cairo_fill(cairo); @@ -653,6 +656,7 @@ static uint32_t render_workspace_button(struct render_context *ctx, cairo_set_operator(cairo, CAIRO_OPERATOR_SOURCE); cairo_set_source_u32(cairo, box_colors.background); ctx->background_color = box_colors.background; + ctx->has_transparency |= (box_colors.background & 0xFF) != 0xFF; cairo_rectangle(cairo, *x, 0, width, height); cairo_fill(cairo); @@ -760,10 +764,12 @@ void render_frame(struct swaybar_output *output) { background_color = output->bar->config->colors.background; } - struct render_context ctx = { 0 }; - ctx.output = output; - // initial background color used for deciding the best way to antialias text - ctx.background_color = background_color; + struct render_context ctx = { + .output = output, + // initial background color used for deciding the best way to antialias text + .background_color = background_color, + .has_transparency = (background_color & 0xFF) != 0xFF, + }; cairo_surface_t *recorder = cairo_recording_surface_create( CAIRO_CONTENT_COLOR_ALPHA, NULL); @@ -834,8 +840,7 @@ void render_frame(struct swaybar_output *output) { wl_surface_damage(output->surface, 0, 0, output->width, output->height); - uint32_t bg_alpha = background_color & 0xFF; - if (bg_alpha == 0xFF) { + if (!ctx.has_transparency) { struct wl_region *region = wl_compositor_create_region(output->bar->compositor); wl_region_add(region, 0, 0, INT32_MAX, INT32_MAX); diff --git a/swaynag/swaynag.c b/swaynag/swaynag.c index 50eea148..da32eeb7 100644 --- a/swaynag/swaynag.c +++ b/swaynag/swaynag.c @@ -324,7 +324,9 @@ static void output_scale(void *data, struct wl_output *output, swaynag_output->scale = factor; if (swaynag_output->swaynag->output == swaynag_output) { swaynag_output->swaynag->scale = swaynag_output->scale; - update_all_cursors(swaynag_output->swaynag); + if (!swaynag_output->swaynag->cursor_shape_manager) { + update_all_cursors(swaynag_output->swaynag); + } render_frame(swaynag_output->swaynag); } }