pmattes / x3270

Family of IBM 3270 emulators
46 stars 18 forks source link

stepping up to too large a font error handling is incomplete #76

Closed swhobbit closed 3 months ago

swhobbit commented 5 months ago

On MacOS using x3270 version 4.4pre1, I normally run font 3270gt24 in a 43 line screen. It almost fill the screen vertically and can be smaller with CMD -. (Yea!)

problem desc: If I accidentally attempt to step the font up even further with CMD +, it tries to expand the windows, so it can set the font up. However, it determines it can't quite do it, and then gives up without restoring the window. Thus the font for the window now has a relatively undersized under sized font in it. (See attached)

expected behavior: If stepping up the window doesn't work (it doesn't fit), the window size and font are restored so the font fills stills a x3270 window which completely fits on the window.

I thought when the step up command was first added, oversizing screen did recover completely. (I'm not sure.)

Normal screen & failed oversized screen Screen shot with configuration

pmattes commented 3 months ago

Earlier versions of x3270 attempted to recover from failed attempts to implicitly resize the screen (changing the font or model, turning on the integrated keypad, etc.) when the window ended up too big to fit. That logic was brittle and unreliable, and has been removed.

Now x3270 uses simpler, more deterministic logic. It accepts any request to resize the screen externally, whether that comes from the user grabbing a resize handle, or the window manager telling it that its attempt to grow the window to accommodate a larger font is invalid. (These two events are indistinguishable in the X11 protocol.) x3270 responds by adjusting the font to the largest size that fits in the requested rectangle, floating the 3270 display in the middle of that area.

The 'snap' menu option is available if you want the window size to be shrunk to the minimum necessary to accommodate the current configuration.