Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package foot for openSUSE:Factory checked in at 2023-08-08 15:54:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/foot (Old) and /work/SRC/openSUSE:Factory/.foot.new.22712 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "foot" Tue Aug 8 15:54:47 2023 rev:26 rq:1102747 version:1.15.3 Changes: -------- --- /work/SRC/openSUSE:Factory/foot/foot.changes 2023-07-30 20:58:34.087503316 +0200 +++ /work/SRC/openSUSE:Factory/.foot.new.22712/foot.changes 2023-08-08 15:54:52.772972684 +0200 @@ -1,0 +2,7 @@ +Mon Aug 7 15:34:47 UTC 2023 - Arnav Singh <opens...@arnavion.dev> + +- Update to v1.15.3: + * Fixed -f,--font command line option not affecting the font used for CSDs. + * See https://codeberg.org/dnkl/foot/releases/tag/1.15.3 for more details. + +------------------------------------------------------------------- Old: ---- foot-1.15.2.tar.gz New: ---- foot-1.15.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ foot.spec ++++++ --- /var/tmp/diff_new_pack.aKOcGZ/_old 2023-08-08 15:54:53.528977416 +0200 +++ /var/tmp/diff_new_pack.aKOcGZ/_new 2023-08-08 15:54:53.532977441 +0200 @@ -17,7 +17,7 @@ Name: foot -Version: 1.15.2 +Version: 1.15.3 Release: 0 Summary: A Wayland terminal emulator License: MIT ++++++ foot-1.15.2.tar.gz -> foot-1.15.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot/CHANGELOG.md new/foot/CHANGELOG.md --- old/foot/CHANGELOG.md 2023-07-30 13:18:55.000000000 +0200 +++ new/foot/CHANGELOG.md 2023-08-07 16:39:54.000000000 +0200 @@ -1,5 +1,6 @@ # Changelog +* [1.15.3](#1-15-3) * [1.15.2](#1-15-2) * [1.15.1](#1-15-1) * [1.15.0](#1-15-0) @@ -44,6 +45,17 @@ * [1.2.0](#1-2-0) +## 1.15.3 + +### Fixed + +* `-f,--font` command line option not affecting `csd.font` (if unset). +* Vertical alignment in URL jump labels, and the scrollback position + indicator. The fix in 1.15.2 was incorrect, and was reverted in the + last minute. But we forgot to remove the entry from the changelog + ([#1430][1430]). + + ## 1.15.2 ### Added diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot/main.c new/foot/main.c --- old/foot/main.c 2023-07-30 13:18:55.000000000 +0200 +++ new/foot/main.c 2023-08-07 16:39:54.000000000 +0200 @@ -222,21 +222,11 @@ bool check_config = false; const char *conf_path = NULL; - const char *conf_term = NULL; - const char *conf_title = NULL; - const char *conf_app_id = NULL; const char *custom_cwd = NULL; - bool login_shell = false; - tll(char *) conf_fonts = tll_init(); - enum conf_size_type conf_size_type = CONF_SIZE_PX; - int conf_width = -1; - int conf_height = -1; bool as_server = false; const char *conf_server_socket_path = NULL; bool presentation_timings = false; bool hold = false; - bool maximized = false; - bool fullscreen = false; bool unlink_pid_file = false; const char *pid_file = NULL; enum log_class log_level = LOG_CLASS_WARNING; @@ -261,23 +251,23 @@ break; case 'o': - tll_push_back(overrides, optarg); + tll_push_back(overrides, xstrdup(optarg)); break; case 't': - conf_term = optarg; + tll_push_back(overrides, xasprintf("term=%s", optarg)); break; case 'L': - login_shell = true; + tll_push_back(overrides, xstrdup("login-shell=yes")); break; case 'T': - conf_title = optarg; + tll_push_back(overrides, xasprintf("title=%s", optarg)); break; case 'a': - conf_app_id = optarg; + tll_push_back(overrides, xasprintf("app-id=%s", optarg)); break; case 'D': { @@ -290,27 +280,11 @@ break; } - case 'f': - tll_free_and_free(conf_fonts, free); - for (char *font = strtok(optarg, ","); font != NULL; font = strtok(NULL, ",")) { - - /* Strip leading spaces */ - while (*font != '\0' && isspace(*font)) - font++; - - /* Strip trailing spaces */ - char *end = font + strlen(font); - xassert(*end == '\0'); - end--; - while (end > font && isspace(*end)) - *(end--) = '\0'; - - if (strlen(font) == 0) - continue; - - tll_push_back(conf_fonts, font); - } + case 'f': { + char *font_override = xasprintf("font=%s", optarg); + tll_push_back(overrides, font_override); break; + } case 'w': { unsigned width, height; @@ -319,9 +293,9 @@ return ret; } - conf_size_type = CONF_SIZE_PX; - conf_width = width; - conf_height = height; + tll_push_back( + overrides, xasprintf("initial-window-size-pixels=%ux%u", + width, height)); break; } @@ -332,9 +306,9 @@ return ret; } - conf_size_type = CONF_SIZE_CELLS; - conf_width = width; - conf_height = height; + tll_push_back( + overrides, xasprintf("initial-window-size-chars=%ux%u", + width, height)); break; } @@ -353,13 +327,11 @@ break; case 'm': - maximized = true; - fullscreen = false; + tll_push_back(overrides, xstrdup("initial-window-mode=maximized")); break; case 'F': - fullscreen = true; - maximized = false; + tll_push_back(overrides, xstrdup("initial-window-mode=fullscreen")); break; case 'p': @@ -494,7 +466,7 @@ bool conf_successful = config_load( &conf, conf_path, &user_notifications, &overrides, check_config, as_server); - tll_free(overrides); + tll_free_and_free(overrides, free); if (!conf_successful) { config_free(&conf); return ret; @@ -515,53 +487,10 @@ (enum fcft_log_class)log_level); fcft_set_scaling_filter(conf.tweak.fcft_filter); - if (conf_term != NULL) { - free(conf.term); - conf.term = xstrdup(conf_term); - } - if (conf_title != NULL) { - free(conf.title); - conf.title = xstrdup(conf_title); - } - if (conf_app_id != NULL) { - free(conf.app_id); - conf.app_id = xstrdup(conf_app_id); - } - if (login_shell) - conf.login_shell = true; - if (tll_length(conf_fonts) > 0) { - for (size_t i = 0; i < ALEN(conf.fonts); i++) - config_font_list_destroy(&conf.fonts[i]); - - struct config_font_list *font_list = &conf.fonts[0]; - xassert(font_list->count == 0); - xassert(font_list->arr == NULL); - - font_list->arr = xmalloc( - tll_length(conf_fonts) * sizeof(font_list->arr[0])); - - tll_foreach(conf_fonts, it) { - struct config_font font; - if (!config_font_parse(it->item, &font)) { - LOG_ERR("%s: invalid font specification", it->item); - } else - font_list->arr[font_list->count++] = font; - } - tll_free(conf_fonts); - } - if (conf_width > 0 && conf_height > 0) { - conf.size.type = conf_size_type; - conf.size.width = conf_width; - conf.size.height = conf_height; - } if (conf_server_socket_path != NULL) { free(conf.server_socket_path); conf.server_socket_path = xstrdup(conf_server_socket_path); } - if (maximized) - conf.startup_mode = STARTUP_MAXIMIZED; - else if (fullscreen) - conf.startup_mode = STARTUP_FULLSCREEN; conf.presentation_timings = presentation_timings; conf.hold_at_exit = hold; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot/meson.build new/foot/meson.build --- old/foot/meson.build 2023-07-30 13:18:55.000000000 +0200 +++ new/foot/meson.build 2023-08-07 16:39:54.000000000 +0200 @@ -1,5 +1,5 @@ project('foot', 'c', - version: '1.15.2', + version: '1.15.3', license: 'MIT', meson_version: '>=0.59.0', default_options: [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot/render.c new/foot/render.c --- old/foot/render.c 2023-07-30 13:18:55.000000000 +0200 +++ new/foot/render.c 2023-08-07 16:39:54.000000000 +0200 @@ -1890,7 +1890,7 @@ render_osd(struct terminal *term, const struct wayl_sub_surface *sub_surf, struct fcft_font *font, struct buffer *buf, const char32_t *text, uint32_t _fg, uint32_t _bg, - unsigned x, unsigned y) + unsigned x) { pixman_region32_t clip; pixman_region32_init_rect(&clip, 0, 0, buf->width, buf->height); @@ -1938,18 +1938,27 @@ pixman_image_t *src = pixman_image_create_solid_fill(&fg); + /* Calculate baseline */ + unsigned y; + { + const int line_height = buf->height; + const int font_height = max(font->height, font->ascent + font->descent); + const int glyph_top_y = round((line_height - font_height) / 2.); + y = term->font_y_ofs + glyph_top_y + font->ascent; + } + for (size_t i = 0; i < glyph_count; i++) { const struct fcft_glyph *glyph = glyphs[i]; if (pixman_image_get_format(glyph->pix) == PIXMAN_a8r8g8b8) { pixman_image_composite32( PIXMAN_OP_OVER, glyph->pix, NULL, buf->pix[0], 0, 0, 0, 0, - x + x_ofs + glyph->x, y + term->font_y_ofs + font->ascent /*term_font_baseline(term)*/ - glyph->y, + x + x_ofs + glyph->x, y - glyph->y, glyph->width, glyph->height); } else { pixman_image_composite32( PIXMAN_OP_OVER, src, glyph->pix, buf->pix[0], 0, 0, 0, 0, - x + x_ofs + glyph->x, y + term->font_y_ofs + font->ascent /* term_font_baseline(term)*/ - glyph->y, + x + x_ofs + glyph->x, y - glyph->y, glyph->width, glyph->height); } @@ -2011,9 +2020,7 @@ const int margin = M != NULL ? M->advance.x : win->csd.font->max_advance.x; - render_osd(term, surf, win->csd.font, buf, title_text, fg, bg, margin, - (buf->height - win->csd.font->height) / 2); - + render_osd(term, surf, win->csd.font, buf, title_text, fg, bg, margin); csd_commit(term, &surf->surface, buf); free(_title_text); } @@ -2580,7 +2587,7 @@ &win->scrollback_indicator, term->fonts[0], buf, text, fg, 0xffu << 24 | bg, - width - margin - c32len(text) * term->cell_width, margin); + width - margin - c32len(text) * term->cell_width); } static void @@ -2618,7 +2625,7 @@ &win->render_timer, term->fonts[0], buf, text, term->colors.table[0], 0xffu << 24 | term->colors.table[8 + 1], - margin, margin); + margin); } static void frame_callback( @@ -3664,7 +3671,7 @@ render_osd( term, sub_surf, term->fonts[0], bufs[i], label, - fg, 0xffu << 24 | bg, x_margin, y_margin); + fg, 0xffu << 24 | bg, x_margin); free(info[i].text); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/foot/vt.c new/foot/vt.c --- old/foot/vt.c 2023-07-30 13:18:55.000000000 +0200 +++ new/foot/vt.c 2023-08-07 16:39:54.000000000 +0200 @@ -645,7 +645,7 @@ new_key ^= new_wc; /* Multiply with magic hash constant */ - new_key *= 2654435761; + new_key *= 2654435761ul; /* And mask, to ensure the new value is within range */ new_key &= CELL_COMB_CHARS_HI - CELL_COMB_CHARS_LO;