Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package foot for openSUSE:Factory checked in 
at 2024-04-18 22:12:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/foot (Old)
 and      /work/SRC/openSUSE:Factory/.foot.new.26366 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "foot"

Thu Apr 18 22:12:14 2024 rev:32 rq:1168636 version:1.17.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/foot/foot.changes        2024-04-12 
17:38:32.440051179 +0200
+++ /work/SRC/openSUSE:Factory/.foot.new.26366/foot.changes     2024-04-18 
22:13:19.511067070 +0200
@@ -1,0 +2,8 @@
+Wed Apr 17 16:17:31 UTC 2024 - Arnav Singh <opens...@arnavion.dev>
+
+- Update to v1.17.2:
+  * OSC notifications with invalid UTF-8 strings are now ignored.
+  * Fixed various crashes.
+  * See https://codeberg.org/dnkl/foot/releases/tag/1.17.2 for more details.
+
+-------------------------------------------------------------------

Old:
----
  foot-1.17.1.tar.gz

New:
----
  foot-1.17.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ foot.spec ++++++
--- /var/tmp/diff_new_pack.KYGC8F/_old  2024-04-18 22:13:20.163091045 +0200
+++ /var/tmp/diff_new_pack.KYGC8F/_new  2024-04-18 22:13:20.163091045 +0200
@@ -20,7 +20,7 @@
 %define _distconfdir %{_sysconfdir}
 %endif
 Name:           foot
-Version:        1.17.1
+Version:        1.17.2
 Release:        0
 Summary:        A Wayland terminal emulator
 License:        MIT

++++++ foot-1.17.1.tar.gz -> foot-1.17.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/foot/.woodpecker.yaml new/foot/.woodpecker.yaml
--- old/foot/.woodpecker.yaml   2024-04-11 15:28:17.000000000 +0200
+++ new/foot/.woodpecker.yaml   2024-04-17 11:26:45.000000000 +0200
@@ -1,11 +1,14 @@
+# -*- yaml -*-
+
 steps:
   - name: codespell
     when:
-      branch:
-        - master
-        - releases/*
+      - event: [manual, pull_request]
+      - event: [push, tag]
+        branch: [master, releases/*]
     image: alpine:edge
     commands:
+      - apk add openssl
       - apk add python3
       - apk add py3-pip
       - python3 -m venv codespell-venv
@@ -16,9 +19,9 @@
 
   - name: subprojects
     when:
-      branch:
-        - master
-        - releases/*
+      - event: [manual, pull_request]
+      - event: [push, tag]
+        branch: [master, releases/*]
     image: alpine:edge
     commands:
       - apk add git
@@ -29,9 +32,9 @@
 
   - name: x64
     when:
-      branch:
-        - master
-        - releases/*
+      - event: [manual, pull_request]
+      - event: [push, tag]
+        branch: [master, releases/*]
     depends_on: [subprojects]
     image: alpine:edge
     commands:
@@ -86,9 +89,9 @@
 
   - name: x86
     when:
-      branch:
-        - master
-        - releases/*
+      - event: [manual, pull_request]
+      - event: [push, tag]
+        branch: [master, releases/*]
     depends_on: [subprojects]
     image: i386/alpine:edge
     commands:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/foot/CHANGELOG.md new/foot/CHANGELOG.md
--- old/foot/CHANGELOG.md       2024-04-11 15:28:17.000000000 +0200
+++ new/foot/CHANGELOG.md       2024-04-17 11:26:45.000000000 +0200
@@ -1,5 +1,6 @@
 # Changelog
 
+* [1.17.2](#1-17-2)
 * [1.17.1](#1-17-1)
 * [1.17.0](#1-17-0)
 * [1.16.2](#1-16-2)
@@ -50,6 +51,26 @@
 * [1.2.0](#1-2-0)
 
 
+## 1.17.2
+
+### Changed
+
+* Notifications with invalid UTF-8 strings are now ignored.
+
+
+### Fixed
+
+* Crash when changing aspect ratio of a sixel, in the middle of the
+  sixel data (this is unsupported in foot, but should of course not
+  result in a crash).
+* Crash when printing double-width (or longer) characters to, or near,
+  the last column, when auto-wrap (private mode 7) has been disabled.
+* Dynamically sized sixel being trimmed to nothing.
+* Flickering with `dpi-aware=yes` and window is unmapped/remapped
+  (some compositors do this when window is minimized), in a
+  multi-monitor setup with different monitor DPIs.
+
+
 ## 1.17.1
 
 ### Added
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/foot/meson.build new/foot/meson.build
--- old/foot/meson.build        2024-04-11 15:28:17.000000000 +0200
+++ new/foot/meson.build        2024-04-17 11:26:45.000000000 +0200
@@ -1,5 +1,5 @@
 project('foot', 'c',
-        version: '1.17.1',
+        version: '1.17.2',
         license: 'MIT',
         meson_version: '>=0.59.0',
         default_options: [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/foot/osc.c new/foot/osc.c
--- old/foot/osc.c      2024-04-11 15:28:17.000000000 +0200
+++ new/foot/osc.c      2024-04-17 11:26:45.000000000 +0200
@@ -524,6 +524,19 @@
     const char *title = strtok_r(string, ";", &ctx);
     const char *msg = strtok_r(NULL, "\x00", &ctx);
 
+    if (title == NULL)
+        return;
+
+    if (mbsntoc32(NULL, title, strlen(title), 0) == (char32_t)-1) {
+        LOG_WARN("%s: notification title is not valid UTF-8, ignoring", title);
+        return;
+    }
+
+    if (msg != NULL && mbsntoc32(NULL, msg, strlen(msg), 0) == (char32_t)-1) {
+        LOG_WARN("%s: notification message is not valid UTF-8, ignoring", msg);
+        return;
+    }
+
     notify_notify(term, title, msg != NULL ? msg : "");
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/foot/sixel.c new/foot/sixel.c
--- old/foot/sixel.c    2024-04-11 15:28:17.000000000 +0200
+++ new/foot/sixel.c    2024-04-17 11:26:45.000000000 +0200
@@ -1400,7 +1400,7 @@
         new_width_mutable = term->sixel.max_width;
     }
 
-    if (unlikely(term->sixel.image.width == new_width_mutable))
+    if (unlikely(term->sixel.image.width >= new_width_mutable))
         return;
 
     const int sixel_row_height = 6 * term->sixel.pan;
@@ -1414,6 +1414,7 @@
         /* Lazy initialize height on first printed sixel */
         xassert(old_width == 0);
         term->sixel.image.height = height = sixel_row_height;
+        term->sixel.image.alloc_height = sixel_row_height;
     } else
         height = term->sixel.image.height;
 
@@ -1423,6 +1424,7 @@
 
     int alloc_height = (height + sixel_row_height - 1) / sixel_row_height * 
sixel_row_height;
 
+    xassert(new_width >= old_width);
     xassert(new_width > 0);
     xassert(alloc_height > 0);
 
@@ -1474,6 +1476,7 @@
     if (unlikely(width == 0)) {
         xassert(term->sixel.image.data == NULL);
         term->sixel.image.height = new_height;
+        term->sixel.image.alloc_height = alloc_height;
         return true;
     }
 
@@ -1508,7 +1511,7 @@
 {
     LOG_DBG("resizing image: %dx%d -> %dx%d",
             term->sixel.image.width, term->sixel.image.height,
-            new_width, new_height);
+            new_width_mutable, new_height_mutable);
 
     if (unlikely(new_width_mutable > term->sixel.max_width)) {
         LOG_WARN("maximum image width exceeded, truncating");
@@ -1849,12 +1852,32 @@
         pan = pan > 0 ? pan : 1;
         pad = pad > 0 ? pad : 1;
 
+        if (likely(term->sixel.image.width == 0 &&
+                   term->sixel.image.height == 0))
+        {
+            term->sixel.pan = pan;
+            term->sixel.pad = pad;
+        } else {
+            /*
+             * Unsure what the VT340 does...
+             *
+             * We currently do *not* handle changing pan/pad in the
+             * middle of a sixel, since that means resizing/stretching
+             * the existing image.
+             *
+             * I'm *guessing* the VT340 simply changes the aspect
+             * ratio of all subsequent sixels. But, given the design
+             * of our implementation (the entire sixel is written to a
+             * single pixman image), we can't easily do that.
+             */
+            LOG_WARN("sixel: unsupported: pan/pad changed after printing 
sixels");
+            pan = term->sixel.pan;
+            pad = term->sixel.pad;
+        }
+
         pv *= pan;
         ph *= pad;
 
-        term->sixel.pan = pan;
-        term->sixel.pad = pad;
-
         LOG_DBG("pan=%u, pad=%u (aspect ratio = %d:%d), size=%ux%u",
                 pan, pad, pan, pad, ph, pv);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/foot/terminal.c new/foot/terminal.c
--- old/foot/terminal.c 2024-04-11 15:28:17.000000000 +0200
+++ new/foot/terminal.c 2024-04-17 11:26:45.000000000 +0200
@@ -858,9 +858,25 @@
     xassert(tll_length(term->wl->monitors) > 0);
 
     const struct wl_window *win = term->window;
-    const struct monitor *mon = tll_length(win->on_outputs) > 0
-        ? tll_back(win->on_outputs)
-        : &tll_front(term->wl->monitors);
+    const struct monitor *mon = NULL;
+
+    if (tll_length(win->on_outputs) > 0)
+        mon = tll_back(win->on_outputs);
+    else {
+        if (term->font_dpi_before_unmap > 0.) {
+            /*
+             * Use last known "good" DPI
+             *
+             * This avoids flickering when window is unmapped/mapped
+             * (some compositors do this when a window is minimized),
+             * on a multi-monitor setup with different monitor DPIs.
+             */
+            return term->font_dpi_before_unmap;
+        }
+
+        if (tll_length(term->wl->monitors) > 0)
+            mon = &tll_front(term->wl->monitors);
+    }
 
     if (term_fractional_scaling(term))
         return mon != NULL ? mon->dpi.physical : 96.;
@@ -1182,6 +1198,7 @@
             xmalloc(sizeof(term->font_sizes[3][0]) * conf->fonts[3].count),
         },
         .font_dpi = 0.,
+        .font_dpi_before_unmap = -1.,
         .font_subpixel = (conf->colors.alpha == 0xffff  /* Can't do subpixel 
rendering on transparent background */
                           ? FCFT_SUBPIXEL_DEFAULT
                           : FCFT_SUBPIXEL_NONE),
@@ -2181,7 +2198,7 @@
 bool
 term_preferred_buffer_scale(const struct terminal *term)
 {
-    return term->wl->has_wl_compositor_v6 && 
term->window->preferred_buffer_scale > 0;
+    return term->window->preferred_buffer_scale > 0;
 }
 
 bool
@@ -2250,6 +2267,7 @@
     }
 
     term->font_dpi = dpi;
+    term->font_dpi_before_unmap = dpi;
     term->font_is_sized_by_dpi = will_scale_using_dpi;
 
     if (!need_font_reload)
@@ -3680,11 +3698,13 @@
         grid_row_uri_range_erase(row, col, col + width - 1);
 
     /* Advance cursor the 'additional' columns while dirty:ing the cells */
-    for (int i = 1; i < width && col < term->cols; i++) {
+    for (int i = 1; i < width && (col + 1) < term->cols; i++) {
         col++;
         print_spacer(term, col, width - i);
     }
 
+    xassert(col < term->cols);
+
     /* Advance cursor */
     if (unlikely(++col >= term->cols)) {
         grid->cursor.lcf = true;
@@ -3726,6 +3746,7 @@
 
     /* Advance cursor */
     if (unlikely(++col >= term->cols)) {
+        xassert(col == term->cols);
         grid->cursor.lcf = true;
         col--;
     } else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/foot/terminal.h new/foot/terminal.h
--- old/foot/terminal.h 2024-04-11 15:28:17.000000000 +0200
+++ new/foot/terminal.h 2024-04-17 11:26:45.000000000 +0200
@@ -406,6 +406,7 @@
     struct config_font *font_sizes[4];
     struct pt_or_px font_line_height;
     float font_dpi;
+    float font_dpi_before_unmap;
     bool font_is_sized_by_dpi;
     int16_t font_x_ofs;
     int16_t font_y_ofs;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/foot/wayland.c new/foot/wayland.c
--- old/foot/wayland.c  2024-04-11 15:28:17.000000000 +0200
+++ new/foot/wayland.c  2024-04-17 11:26:45.000000000 +0200
@@ -1096,7 +1096,6 @@
 
 #if defined (WL_SURFACE_PREFERRED_BUFFER_SCALE_SINCE_VERSION)
         const uint32_t preferred = 
WL_SURFACE_PREFERRED_BUFFER_SCALE_SINCE_VERSION;
-        wayl->has_wl_compositor_v6 = version >= 
WL_SURFACE_PREFERRED_BUFFER_SCALE_SINCE_VERSION;
 #else
         const uint32_t preferred = required;
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/foot/wayland.h new/foot/wayland.h
--- old/foot/wayland.h  2024-04-11 15:28:17.000000000 +0200
+++ new/foot/wayland.h  2024-04-17 11:26:45.000000000 +0200
@@ -430,8 +430,6 @@
     struct wl_subcompositor *sub_compositor;
     struct wl_shm *shm;
 
-    bool has_wl_compositor_v6;
-
     struct zxdg_output_manager_v1 *xdg_output_manager;
 
     struct xdg_wm_base *shell;

Reply via email to