Hello,
in the attachment is a proposed patch for Issue 848 for gtk3vim
https://github.com/vim/vim/issues/848
[written by Kazunobu Kuriyama (nuko8) and me].
This issue cannot be seen at all window managers [but openbox seems to
be a good candidate].
What is changed by the patch?
This patch changes the clearing/redrawing order if `draw_event` is
called with more than one (dirty) rectangle.
old order:
clear for rect1; redraw rect1; clear for rect2; redraw rect2; ...
new order:
clear for rect1,rect2,...; redraw rect1,rect2,...;
Why?
There is the hypothesis that later clear-actions (e.g. clear for rect2)
can/may remove some of the parts already drawn by former redraw-actions
(e.g. redraw rect1).
For more details, please see discussion at the issue page.
Bye
C. Ludwig
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index eef0bd4..4553d83 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -630,6 +630,7 @@ static void gui_gtk_window_clear(GdkWindow *win);
static void
gui_gtk3_redraw(int x, int y, int width, int height)
{
+ /* Range checks are left to gui_redraw_block() */
gui_redraw_block(Y_2_ROW(y), X_2_COL(x),
Y_2_ROW(y + height - 1), X_2_COL(x + width - 1),
GUI_MON_NOCLEAR);
@@ -688,9 +689,13 @@ draw_event(GtkWidget *widget UNUSED,
{
const cairo_rectangle_t rect = list->rectangles[i];
- gui_mch_clear_block(Y_2_ROW(rect.y), 1,
- Y_2_ROW(rect.y + rect.height - 1), Columns);
+ gui_mch_clear_block(Y_2_ROW((int)rect.y), 0,
+ Y_2_ROW((int)(rect.y + rect.height)) - 1, Columns - 1);
+ }
+ for (i = 0; i < list->num_rectangles; i++)
+ {
+ const cairo_rectangle_t rect = list->rectangles[i];
if (blink_mode)
gui_gtk3_redraw(rect.x, rect.y, rect.width, rect.height);
else
@@ -6723,6 +6728,11 @@ gui_mch_clear_block(int row1, int col1, int row2, int col2)
color.pixel = gui.back_pixel;
#endif
+ col1 = check_col(col1);
+ col2 = check_col(col2);
+ row1 = check_row(row1);
+ row2 = check_row(row2);
+
#if GTK_CHECK_VERSION(3,0,0)
{
/* Add one pixel to the far right column in case a double-stroked