[PR #15615] AtlasEngine: Harden against empty target sizes #30686

Open
opened 2026-01-31 09:42:20 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/15615

State: closed
Merged: Yes


The WPF control has a minor bug where it initializes the renderer
when there isn't even a window yet. When it then calls SetWindowSize
it'll pass the result of GetWindowRect which is 0,0,0,0.
This made AtlasEngine unhappy because it restricted the glyph atlas
size to some multiple of the window size. If the window size is 0,0
then there couldn't be a glyph atlas and so it crashed.

Validation Steps Performed

  • Fixes WPF test control crash on startup
**Original Pull Request:** https://github.com/microsoft/terminal/pull/15615 **State:** closed **Merged:** Yes --- The WPF control has a minor bug where it initializes the renderer when there isn't even a window yet. When it then calls `SetWindowSize` it'll pass the result of `GetWindowRect` which is `0,0,0,0`. This made AtlasEngine unhappy because it restricted the glyph atlas size to some multiple of the window size. If the window size is `0,0` then there couldn't be a glyph atlas and so it crashed. ## Validation Steps Performed * Fixes WPF test control crash on startup ✅
claunia added the pull-request label 2026-01-31 09:42:20 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30686