[PATCH 1/3] wineconsole: Apply the new background colour to the visible screen buffer

Hugh McMaster hugh.mcmaster at outlook.com
Mon Jan 25 04:01:00 CST 2016


We currently apply the new background colour to the text typed
in the newline after the change.

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
 programs/wineconsole/wineconsole.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c
index 729416f..f9027a4 100644
--- a/programs/wineconsole/wineconsole.c
+++ b/programs/wineconsole/wineconsole.c
@@ -441,7 +441,12 @@ void     WINECON_SetConfig(struct inner_data* data, const struct config_data* cf
     }
     if (data->curcfg.def_attr != cfg->def_attr)
     {
+        DWORD screen_size, written;
+        COORD top_left = {0,0};
+
         data->curcfg.def_attr = cfg->def_attr;
+        screen_size = cfg->win_width * (cfg->win_height + 1);
+        FillConsoleOutputAttribute(data->hConOut, cfg->def_attr, screen_size, top_left, &written);
         SetConsoleTextAttribute(data->hConOut, cfg->def_attr);
     }
     /* now let's look at the window / sb size changes...
-- 
1.9.1




More information about the wine-patches mailing list