WriteConsoleOutput() does not write at expected position when console window is maximized/restored #17527
Labels
Area-Server
Down in the muck of API call servicing, interprocess communication, eventing, etc.
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Needs-Tag-Fix
Doesn't match tag requirements
Product-Conhost
For issues in the Console codebase
Milestone
Windows Terminal version
1.20.11381.0
Windows build number
10.0.22631.3737
Other Software
Steps to reproduce
Run the program above.
It outputs a new background color every second, along with a beep.
Maximize console window (eg: double click on title)
Restore console window (eg: double click on title again)
Expected Behavior
Right after console window is restored, the background color is updated.
Actual Behavior
The background color stay the same.
WriteConsoleOutput() render characters at the top of the console area, which is invisible (you have to scroll up to see it).
Instead, it should render characters in the visible portion of the console.
Setting the console cursor at a position other than (0, 0) fix the issue. That probably why some project like Terminal.Gui are not affected (eg: cursor is usually set inside active control).
The old command prompt does not have this bug. Using AtlasEngine does not fix the issue.
The text was updated successfully, but these errors were encountered: