diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-09-15 17:58:29 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-09-15 17:58:29 +0200 |
commit | 3b59755862f4604ded8155404a1fe4c84c606829 (patch) | |
tree | 8bc7ae5bbed29ac2f18a43554764fae092e8ecd3 | |
parent | 54f018cd5994c3ffcd0740526e56db6934edf1f2 (diff) |
patch 7.4.869v7.4.869
Problem: MS-Windows: scrolling may cause text to disappear when using an
Intel GPU.
Solution: Call GetPixel(). (Yohei Endo)
-rw-r--r-- | src/gui_w48.c | 28 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 25 insertions, 5 deletions
diff --git a/src/gui_w48.c b/src/gui_w48.c index b40a6b9e00..bff67a8131 100644 --- a/src/gui_w48.c +++ b/src/gui_w48.c @@ -2389,7 +2389,7 @@ show_tabline_popup_menu(void) return; if (first_tabpage->tp_next != NULL) - add_tabline_popup_menu_entry(tab_pmenu, + add_tabline_popup_menu_entry(tab_pmenu, TABLINE_MENU_CLOSE, _("Close tab")); add_tabline_popup_menu_entry(tab_pmenu, TABLINE_MENU_NEW, _("New tab")); add_tabline_popup_menu_entry(tab_pmenu, TABLINE_MENU_OPEN, @@ -2931,10 +2931,10 @@ gui_mswin_get_valid_dimensions( base_width = gui_get_base_width() + (GetSystemMetrics(SM_CXFRAME) + - GetSystemMetrics(SM_CXPADDEDBORDER)) * 2; + GetSystemMetrics(SM_CXPADDEDBORDER)) * 2; base_height = gui_get_base_height() + (GetSystemMetrics(SM_CYFRAME) + - GetSystemMetrics(SM_CXPADDEDBORDER)) * 2 + GetSystemMetrics(SM_CXPADDEDBORDER)) * 2 + GetSystemMetrics(SM_CYCAPTION) #ifdef FEAT_MENU + gui_mswin_get_menu_height(FALSE) @@ -2997,6 +2997,20 @@ get_scroll_flags(void) } /* + * On some Intel GPUs, the regions drawn just prior to ScrollWindowEx() + * may not be scrolled out properly. + * For gVim, when _OnScroll() is repeated, the character at the + * previous cursor position may be left drawn after scroll. + * The problem can be avoided by calling GetPixel() to get a pixel in + * the region before ScrollWindowEx(). + */ + static void +intel_gpu_workaround(void) +{ + GetPixel(s_hdc, FILL_X(gui.col), FILL_Y(gui.row)); +} + +/* * Delete the given number of lines from the given row, scrolling up any * text further down within the scroll region. */ @@ -3007,6 +3021,8 @@ gui_mch_delete_lines( { RECT rc; + intel_gpu_workaround(); + rc.left = FILL_X(gui.scroll_region_left); rc.right = FILL_X(gui.scroll_region_right + 1); rc.top = FILL_Y(row); @@ -3038,6 +3054,8 @@ gui_mch_insert_lines( { RECT rc; + intel_gpu_workaround(); + rc.left = FILL_X(gui.scroll_region_left); rc.right = FILL_X(gui.scroll_region_right + 1); rc.top = FILL_Y(row); @@ -3319,10 +3337,10 @@ gui_mch_newfont() GetWindowRect(s_hwnd, &rect); gui_resize_shell(rect.right - rect.left - (GetSystemMetrics(SM_CXFRAME) + - GetSystemMetrics(SM_CXPADDEDBORDER)) * 2, + GetSystemMetrics(SM_CXPADDEDBORDER)) * 2, rect.bottom - rect.top - (GetSystemMetrics(SM_CYFRAME) + - GetSystemMetrics(SM_CXPADDEDBORDER)) * 2 + GetSystemMetrics(SM_CXPADDEDBORDER)) * 2 - GetSystemMetrics(SM_CYCAPTION) #ifdef FEAT_MENU - gui_mswin_get_menu_height(FALSE) diff --git a/src/version.c b/src/version.c index a3eabcf3fe..bc1e5550ca 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 869, +/**/ 868, /**/ 867, |