Repository navigation
Open the session window for the model's alternate screen (#198) - #199
Merged
Merged
Conversation
A model 4 starts on its 24x80 default screen, and TSO's logon switches it to the 43x80 alternate one; the window stayed 960x680 and the screen refitted, so the text shrank by about a third. The cells now fit the profile's alternate size (or the screen, where larger), so the switch keeps the cell size and the default screen sits at the top, as in x3270. The window sizes itself to that grid at 22 pt for its first layout, capped to the display's working area, and is the user's to resize from then on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- OversizeGeometry.TryFor is the one reading of a profile's oversize, for b3270's command line and the window's alternate size alike. A profile without the extended data stream has none, as b3270 drops -oversize without it, so its window no longer opens for a screen it never gets. - A profile with a note or tags lays its connect banner out unseen until the window opens, so the banner arriving keeps the cell size. - CellGeometry.GridSize asks for a DIP to spare, so a platform rounding the size to device pixels cannot take the font a size down. - Opened moves the window into the working area its size was capped for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
High-effort code review: fixes in 97cdaedA high-effort review raised six findings. Five are fixed in 97cdaed. One didn't reproduce, so it needed no change. Fixed
No change needed
Visible effects of the fixes
Still to check by hand
Full suite green. |
The review's first fix had OversizeGeometry.TryFor answer no oversize for a profile without Extended, since b3270 drops -oversize when the extended data stream is off. But an unchecked Extended only drops the model's -E, which b3270 4.5 ignores: the bundled engine still reports extended and a 60x132 screen for -model 3279-2 -oversize 132x60. So that profile lost its oversize on the command line, and its window opened for the model alone, which is #198 again. TryFor stays as the one reading of the field, without the rule; #200 tracks the checkbox, and its fix has to bring the rule back with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
Review follow-up: fix 1 taken back out in 6023078Checking 97cdaed turned up a wrong premise in fix 1, "an oversize without the extended data stream sized the
Fixes 2 to 5 stand. Fix 5 checked out live on macOS: a model 4 window, 952x1006, opened with its top at y=122 and Full suite green. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #198.
A model 4 starts on its 24x80 default screen, and TSO's logon switches it to the 43x80 alternate one. The session
window stayed a fixed 960x680 and the screen refitted the new grid into the same area, so the text shrank by about a
third, with blank bands on either side, until the window was resized by hand.
What changes
ScreenSize.AlternateFor(profile)(Core)is the profile's oversize geometry when it has one the engine would take, else the model's own size: what b3270
reports as screen-mode's rows and columns, but known before the engine runs.
TerminalScreen.AlternateSizemakesit a floor on the grid
CellGeometry.Fitsees, widened to the snapshot wherever that is larger. An Erase/WriteAlternate therefore keeps the cell size, and the 24x80 default screen sits at the top left of the same area, as in
x3270.
TerminalScreen.MeasureOverrideasks for it atPreferredFontSize(22, what 80 columns got across the old 960-wide window), or at the largest size that fits.
SessionWindowisSizeToContentfor its first layout only, capped byLimitOpeningSizeto the working area of the display theuser is on (
App.OpeningDisplay,SessionWindow.OpeningRoom). Avalonia's own cap is the largest display'swhole bounds on macOS and X11.
OpenedsetsManualand drops the cap, so from then on the size is the user's,and a bar appearing under the screen takes its room from the screen.
KeepsRequestedSize. Avalonia arranges a size-to-content window's content once before showing it, at theplatform's first client size, and the OIA bar follows the font that arrange settles on. Without this, the bar's
height came from a bogus size and the window opened a few DIPs short, one font size down. A headless test caught
it. The screen keeps the size it asked for until
Opened.CellGeometrygainsAt(a given size, placed asFitplaces its own) andGridSize(the room a grid takes,rounded up).
Fittakes a 1e-9 epsilon so that an areaGridSizemeasured fits the same size back.Visible side effect
A model 2 window now opens snug around its screen, at about 951x610 rather than 960x680, with no bands above and
below.
Tests
ScreenSizeTests(Core),SessionWindowSizeTests, and the alternate-size, measure andKeepsRequestedSizecases inTerminalScreenLayoutTestsandCellGeometryTests.SessionWindowTests.Show()and one blink test now settle the layout afterShow()or resize through a host.The screen is arranged at the window's opening size in the pass after
Show, as on any real window before inputarrives.
dotnet build LizTerm.slnx --no-incrementalreports 0 warnings.Hands-on
and Wally ISPF at 43x80 keeps the same text size.
with its top at y=475, so its bottom reached below the Dock. The size was capped correctly, but the placement is
the platform's (
WindowStartupLocationis still Manual). A possible follow-up is to centre the window on, ornudge it into, the display's working area once shown.
🤖 Generated with Claude Code