[vte/wip/sixels: 37/82] terminal: Draw stacked images in order of appearance (oldest to newest)



commit 9a69ea10b77d468d907d85313ce4d224744ce63e
Author: Hans Petter Jansson <hpj cl no>
Date:   Tue Jun 9 00:29:36 2020 +0200

    terminal: Draw stacked images in order of appearance (oldest to newest)

 src/vte.cc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index ba88f739..ab7f786d 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -9310,11 +9310,12 @@ Terminal::widget_draw(cairo_t *cr)
        if (m_sixel_enabled) {
                vte::grid::row_t top_row = first_displayed_row();
                vte::grid::row_t bottom_row = last_displayed_row();
-               auto image_map = ring->m_image_map;
-               auto it = image_map->lower_bound (top_row);
+               auto image_map = ring->m_image_priority_map;
+               auto it = image_map->begin ();
                for (; it != image_map->end (); ++it) {
                        vte::image::Image *image = it->second;
-                       if (image->get_top () > bottom_row)
+                        if (image->get_bottom() < top_row
+                            || image->get_top() > bottom_row)
                                break;
                        /* Display images */
                        int x = m_padding.left + image->get_left () * m_cell_width;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]