Skip to content

Reporting window size events in stdin #14975

Answered by DHowett
ShrykeWindgrace asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @ShrykeWindgrace! This is one place where we could seriously do better. Alright, here goes.

Right now, the window size events come in in the form of INPUT_RECORD structures when you use ReadConsoleInputW. Even in VT mode.

We don't have a VT encoding for window size events for one really annoying reason: nobody does! On non-Windows platforms, these things come in via an asynchronous signal SIGWINCH, and are read out of the tty via the TIOCGSZ IOCTL. We don't have either of those things on which to build a good window size notification primitive, so instead it comes in as raw events in the input stream.

So, I can give you these two things:

  1. A "template" for how we deal with it, when all…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by DHowett
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@determin1st
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Issue-Question For questions or discussion Resolution-Answered Related to questions that have been answered
3 participants
Converted from issue

This discussion was converted from issue #14958 on March 09, 2023 20:07.