DCS sequences are no longer passed through in real time #21566

Open
opened 2026-01-31 07:48:22 +00:00 by claunia · 0 comments
Owner

Originally created by @j4james on GitHub (Apr 23, 2024).

Originally assigned to: @lhecker on GitHub.

Windows Terminal version

Commit 99061ee272

Windows build number

10.0.19045.4291

Other Software

No response

Steps to reproduce

Run the following python script:

import sys
import time

sys.stdout.write('\033[37;40m\033[2J')
sys.stdout.flush()
sys.stdout.write('\033P2$p')
for i in range(1,11):
  sys.stdout.write('0;2;%d;0;0/' % (i*10))
  sys.stdout.flush()
  time.sleep(1)
sys.stdout.write('0;2;0;0;0\033\\')

Expected Behavior

The screen should clear, and the background should then slowly animate from dark red to bright red over a period of 10 seconds. This works as expected in version 1.20.10822.0.

Actual Behavior

Using a recent commit from the main branch, the screen now just remains black for 10 seconds - it never changes to red.

The problem is that the DCS sequence that alters the palette is not being passed through to the conpty client as it's received, and by the time the DCS sequence terminates, the palette will have been reset to black, so it appears to have no effect.

I believe this broke in commit 1ede023331.

Originally created by @j4james on GitHub (Apr 23, 2024). Originally assigned to: @lhecker on GitHub. ### Windows Terminal version Commit 99061ee272b72c6d565802068f7b09ab12e4173e ### Windows build number 10.0.19045.4291 ### Other Software _No response_ ### Steps to reproduce Run the following python script: ```py import sys import time sys.stdout.write('\033[37;40m\033[2J') sys.stdout.flush() sys.stdout.write('\033P2$p') for i in range(1,11): sys.stdout.write('0;2;%d;0;0/' % (i*10)) sys.stdout.flush() time.sleep(1) sys.stdout.write('0;2;0;0;0\033\\') ``` ### Expected Behavior The screen should clear, and the background should then slowly animate from dark red to bright red over a period of 10 seconds. This works as expected in version 1.20.10822.0. ### Actual Behavior Using a recent commit from the main branch, the screen now just remains black for 10 seconds - it never changes to red. The problem is that the DCS sequence that alters the palette is not being passed through to the conpty client as it's received, and by the time the DCS sequence terminates, the palette will have been reset to black, so it appears to have no effect. I believe this broke in commit 1ede0233318088d4a1797c9c5d38904cc3f02e95.
claunia added the Issue-BugArea-VTNeeds-Tag-FixProduct-Conpty labels 2026-01-31 07:48:22 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21566