A few days ago I noticed that NeoVim in tmux does not pick up resize events properly, but mysteriously when a different console window is resized, it suddenly fixes itself. I just tracked this down to the fact that libuv is listening for the EVENT_CONSOLE_LAYOUT WinEvent for any window, which doesn't seem to be firing for PTY layout changes.
Now, I believe this is a libuv bug and they should be handling WINDOW_BUFFER_SIZE_EVENT. But before ConPTY existed, their way did work.
Basically I'm looking for some clarification here - what are the console WinEvents supposed to be for, and should they be enabled for PTYs as well? And if not, it might be a good idea to document that they are only sent for actual conhost windows.
Hey, it's really funny that you should mention this. I'm working on filing a bug on them for this exact issue, because their winevent hook degrades performance for _all console workloads_ by a few percentage points if a libuv thing is running whatsoever.
I believe that _WinEvents are not part of the compatibility guarantee for pseudoconsoles._ @miniksa can keep me honest here.
More info: https://github.com/microsoft/terminal/issues/410 @parkovski
Hey, it's really funny that you should mention this. I'm working on filing a bug on them for this exact issue, because their winevent hook degrades performance for _all console workloads_ by a few percentage points if a libuv thing is running whatsoever.
I believe that _WinEvents are not part of the compatibility guarantee for pseudoconsoles._ @miniksa can keep me honest here.
Correct. Given that UIA (released 2005) is the replacement for WinEvents/MSAA (released 1997) and UIA is significantly less terrible than MSAA performance-wise (and otherwise), we didn't consider it during the implementation of ConPTY (2018).
Also, MSAA and UIA are for accessibility tools and user interface testing. I don't guarantee anything if you're not attempting to use them for those purposes.
I'm marking this one as answered and closing it. I'll follow up with the libuv bug. :smile:
Most helpful comment
Hey, it's really funny that you should mention this. I'm working on filing a bug on them for this exact issue, because their winevent hook degrades performance for _all console workloads_ by a few percentage points if a libuv thing is running whatsoever.
I believe that _WinEvents are not part of the compatibility guarantee for pseudoconsoles._ @miniksa can keep me honest here.