Mercurial > vim
comparison src/gui_dwrite.cpp @ 16091:e8d8650fa625 v8.1.1050
patch 8.1.1050: blank srceen when DirectWrite failed
commit https://github.com/vim/vim/commit/3dd174abbf2bf1bb4e42aa21ff78fb9b4f8b4679
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Mar 25 22:48:18 2019 +0100
patch 8.1.1050: blank srceen when DirectWrite failed
Problem: Blank srceen when DirectWrite failed.
Solution: Call redraw_later_clear() after recreating the Direct2D render
target. (Ken Takata, closes #4172)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 25 Mar 2019 23:00:05 +0100 |
parents | 728bef04b0d4 |
children | 563163ec0244 |
comparison
equal
deleted
inserted
replaced
16090:968fefb28be4 | 16091:e8d8650fa625 |
---|---|
928 Flush(); | 928 Flush(); |
929 Rebind(); | 929 Rebind(); |
930 } | 930 } |
931 } | 931 } |
932 | 932 |
933 extern "C" void redraw_later_clear(void); | |
934 | |
933 HRESULT | 935 HRESULT |
934 DWriteContext::SetDrawingMode(DrawingMode mode) | 936 DWriteContext::SetDrawingMode(DrawingMode mode) |
935 { | 937 { |
936 HRESULT hr = S_OK; | 938 HRESULT hr = S_OK; |
937 | 939 |
950 if (hr == D2DERR_RECREATE_TARGET) | 952 if (hr == D2DERR_RECREATE_TARGET) |
951 { | 953 { |
952 hr = S_OK; | 954 hr = S_OK; |
953 DiscardDeviceResources(); | 955 DiscardDeviceResources(); |
954 CreateDeviceResources(); | 956 CreateDeviceResources(); |
957 redraw_later_clear(); | |
955 } | 958 } |
956 mDrawing = false; | 959 mDrawing = false; |
957 } | 960 } |
958 break; | 961 break; |
959 | 962 |