Mercurial > vim
comparison src/gui_gtk_x11.c @ 9232:a64e2a624fbe v7.4.1899
commit https://github.com/vim/vim/commit/8e31fd52ec8be6ef1dc600b637d5f099d55e1715
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jun 4 22:18:13 2016 +0200
patch 7.4.1899
Problem: GTK 3: cursor blinking doesn't work well.
Solution: Instead of gui_gtk_window_clear() use gui_mch_clear_block().
(Kazunobu Kuriyama)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 04 Jun 2016 22:30:06 +0200 |
parents | bb86514cad15 |
children | c25898cc99c1 |
comparison
equal
deleted
inserted
replaced
9231:05ac1a1aedd4 | 9232:a64e2a624fbe |
---|---|
655 cond |= gui.in_focus == FALSE; | 655 cond |= gui.in_focus == FALSE; |
656 return cond; | 656 return cond; |
657 } | 657 } |
658 | 658 |
659 static gboolean | 659 static gboolean |
660 draw_event(GtkWidget *widget, | 660 draw_event(GtkWidget *widget UNUSED, |
661 cairo_t *cr, | 661 cairo_t *cr, |
662 gpointer user_data UNUSED) | 662 gpointer user_data UNUSED) |
663 { | 663 { |
664 /* Skip this when the GUI isn't set up yet, will redraw later. */ | 664 /* Skip this when the GUI isn't set up yet, will redraw later. */ |
665 if (gui.starting) | 665 if (gui.starting) |
672 | 672 |
673 /* Draw the window without the cursor. */ | 673 /* Draw the window without the cursor. */ |
674 gui.by_signal = TRUE; | 674 gui.by_signal = TRUE; |
675 { | 675 { |
676 cairo_rectangle_list_t *list = NULL; | 676 cairo_rectangle_list_t *list = NULL; |
677 | |
678 gui_gtk_window_clear(gtk_widget_get_window(widget)); | |
679 | 677 |
680 list = cairo_copy_clip_rectangle_list(cr); | 678 list = cairo_copy_clip_rectangle_list(cr); |
681 if (list->status != CAIRO_STATUS_CLIP_NOT_REPRESENTABLE) | 679 if (list->status != CAIRO_STATUS_CLIP_NOT_REPRESENTABLE) |
682 { | 680 { |
683 int i; | 681 int i; |
684 for (i = 0; i < list->num_rectangles; i++) | 682 for (i = 0; i < list->num_rectangles; i++) |
685 { | 683 { |
686 const cairo_rectangle_t rect = list->rectangles[i]; | 684 const cairo_rectangle_t rect = list->rectangles[i]; |
685 | |
686 gui_mch_clear_block(Y_2_ROW(rect.y), 1, | |
687 Y_2_ROW(rect.y + rect.height - 1), Columns); | |
688 | |
687 if (blink_mode) | 689 if (blink_mode) |
688 gui_gtk3_redraw(rect.x, rect.y, rect.width, rect.height); | 690 gui_gtk3_redraw(rect.x, rect.y, rect.width, rect.height); |
689 else | 691 else |
690 { | 692 { |
691 if (get_real_state() & VISUAL) | 693 if (get_real_state() & VISUAL) |