[Commits] [SCM] claws branch, gtk3, updated. 3.16.0-525-gdbc74f0

ticho at claws-mail.org ticho at claws-mail.org
Tue Dec 18 16:38:51 CET 2018


The branch, gtk3 has been updated
       via  dbc74f0725947cc93455a1fd00bb9fe485099b53 (commit)
      from  cfb7606882f867569b983ce66b64b1362fb87d6e (commit)

Summary of changes:
 src/gtk/gtkcmclist.c |   18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)


- Log -----------------------------------------------------------------
commit dbc74f0725947cc93455a1fd00bb9fe485099b53
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Tue Dec 18 16:25:57 2018 +0100

    Fix topmost row not being redrawn in GtkCMCList expose event.
    
    This happened during scrolling, when top of the rectangle GTK
    asks us to redraw would be in the middle of a row. This
    "half-visible" row would not be redrawn, leaving its lower
    part (inside the rectangle) blank.

diff --git a/src/gtk/gtkcmclist.c b/src/gtk/gtkcmclist.c
index 521e802..de34e89 100644
--- a/src/gtk/gtkcmclist.c
+++ b/src/gtk/gtkcmclist.c
@@ -6035,11 +6035,19 @@ draw_rows (GtkCMCList     *clist,
       last_row = ROW_FROM_YPIXEL (clist, clist->clist_window_height);
     }
 
-  /* this is a small special case which exposes the bottom cell line
-   * on the last row -- it might go away if I change the wall the cell
-   * spacings are drawn
+  /* Two special cases:
+   * 1. this is a small special case which exposes the bottom cell line
+   *    on the last row -- it might go away if I change the wall the cell
+   *    spacings are drawn
+   * 2. in GTK3, the area being redrawn in an expose event is blanked
+   *    out, and since ROW_FROM_YPIXEL returns first fully visible
+   *    row, we also need to redraw the half-visible row that is above
+   *    it;
+   *    TODO: optimization: do not do this if top of first_row matches
+   *    top of the area rectangle exactly
    */
-  if (clist->rows == first_row)
+  if (clist->rows == first_row ||
+      (area && first_row > 0))
     first_row--;
 
   list = ROW_ELEMENT (clist, first_row);
@@ -6052,7 +6060,7 @@ draw_rows (GtkCMCList     *clist,
       if (i > last_row)
 	return;
 
-      GTK_CMCLIST_GET_CLASS (clist)->draw_row (clist, area, i, clist_row);
+      GTK_CMCLIST_GET_CLASS (clist)->draw_row (clist, NULL, i, clist_row);
       i++;
     }
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list