Do not redraw focus of GtkCMCList if the row is unchanged in move_focus_row();
authorAndrej Kacian <ticho@claws-mail.org>
Tue, 16 Oct 2018 16:18:40 +0000 (18:18 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Tue, 16 Oct 2018 16:18:40 +0000 (18:18 +0200)
src/gtk/gtkcmclist.c

index a72e1551d25dd79b5ca697fa5232cf2f6d547014..3009e39018a908f68944d4c95289ad29dd36f2c8 100644 (file)
@@ -6955,8 +6955,13 @@ move_focus_row (GtkCMCList      *clist,
     case GTK_SCROLL_JUMP:
       if (position >= 0 && position <= 1)
        {
+         gint row = position * (clist->rows - 1);
+
+         if (row == clist->focus_row)
+           return;
+
          gtk_cmclist_undraw_focus (widget);
-         clist->focus_row = position * (clist->rows - 1);
+         clist->focus_row = row;
          gtk_cmclist_draw_focus (widget);
        }
       break;