Rendering improvment request: temporarily disable text layouting when window is doing maximizing and restoring from maximizing #19394

Closed
opened 2026-01-31 06:42:00 +00:00 by claunia · 3 comments
Owner

Originally created by @epiciskandar on GitHub (Feb 15, 2023).

Description of the new feature/enhancement

When the Terminal window maximizing/restoring under Windows 11, Windows(maybe DWM?) will make that action animationized. This will make Terminal recalculating the width/height of the display area per frame, and eventually cause text re-layouting and rendering with different results. At the first few frame, it will looks unstable and flashing。

below is some frames while Terminal window is maximizing:

  • the begining state: normal (misplaced prompts is intentional)
    image
  • the first few frames one by one:
    image
    image
    image
  • nearly to the last frame:
    image

The first one or two frame looks unstable, starting from the 3rd frame, it looks same to the final state.So, can the Terminal just shortly disable/ignore layout calculate works while it starts doing maximizing/restoring?

Proposed technical implementation details (optional)

Originally created by @epiciskandar on GitHub (Feb 15, 2023). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> When the Terminal window maximizing/restoring under Windows 11, Windows(maybe DWM?) will make that action animationized. This will make Terminal recalculating the width/height of the display area per frame, and eventually cause text re-layouting and rendering with different results. At the first few frame, it will looks unstable and flashing。 below is some frames while Terminal window is maximizing: * the begining state: normal (***misplaced prompts is intentional***) ![image](https://user-images.githubusercontent.com/1884240/219036797-8d7f2732-7e2d-4b35-a21a-45b64ded7d67.png) * the first few frames one by one: ![image](https://user-images.githubusercontent.com/1884240/219037371-54f4d7b9-0431-45a8-9f6d-fbf821b4b58a.png) ![image](https://user-images.githubusercontent.com/1884240/219037429-79f6644b-112c-4324-aa4f-0c0eb29756aa.png) ![image](https://user-images.githubusercontent.com/1884240/219037499-52b89938-dad7-4b80-a49d-e5a050fd1db4.png) * nearly to the last frame: ![image](https://user-images.githubusercontent.com/1884240/219038956-e1de023a-0668-421e-be5c-45d1cf87633f.png) The first one or two frame looks unstable, starting from the 3rd frame, it looks same to the final state.So, can the Terminal just shortly disable/ignore layout calculate works while it starts doing maximizing/restoring? # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. -->
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-31 06:42:01 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Feb 15, 2023):

Can you maybe share a video of what you're describing/? I think I'm having a bit of a hard time understanding1 .

I was under the impression that the win11 resize was actually specifically designed to not send the app an actual WM_SIZE until the final size was chosen, and the rest is just a visual effect that the system applies to make it look like there's a smooth resize going on. I could be mistaken, maybe that was just a prototype thing that never ended up shipping.


  1. I most certainly need more coffee ↩︎

@zadjii-msft commented on GitHub (Feb 15, 2023): Can you maybe share a video of what you're describing/? I think I'm having a bit of a hard time understanding[^1]. I was under the impression that the win11 resize was actually specifically designed to _not_ send the app an actual WM_SIZE until the final size was chosen, and the rest is just a visual effect that the system applies to make it _look_ like there's a smooth resize going on. I could be mistaken, maybe that was just a prototype thing that never ended up shipping. [^1]: I most certainly need more coffee
Author
Owner

@DHowett commented on GitHub (Feb 16, 2023):

I'd definitely like to get more info on this. On my Windows 11 (builds 22000 and 25298!) machine, maximize and restore do not commit the size to the application until they are complete. There is no intermediate step during which the application is struggling under the weight of a thousand WM_SIZE messages. 😄

@DHowett commented on GitHub (Feb 16, 2023): I'd definitely like to get more info on this. On my Windows 11 (builds 22000 and 25298!) machine, maximize and restore _do not commit the size to the application until they are complete._ There is no intermediate step during which the application is struggling under the weight of a thousand `WM_SIZE` messages. :smile:
Author
Owner

@epiciskandar commented on GitHub (Feb 16, 2023):

I think I'm having a bit of a hard time understanding

Actually, it is what you understand, sorry but unfortunately(and luckily too?) I can not reproduce that again, and I have not save that recording video..

One thing I forgot to say is I disabled acrylic while transparent is on, that makes window animation a little different to when acrylic is on, but I too discovered other application windows have the same effect, so that is something another about Windows OS.

I'm closing this and will reopen if that occur again, thanks.

@epiciskandar commented on GitHub (Feb 16, 2023): > I think I'm having a bit of a hard time understanding Actually, it is what you understand, sorry but unfortunately(and luckily too?) I can not reproduce that again, and I have not save that recording video.. One thing I forgot to say is I disabled acrylic while transparent is on, that makes window animation a little different to when acrylic is on, but I too discovered other application windows have the same effect, so that is something another about Windows OS. I'm closing this and will reopen if that occur again, thanks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19394