Bug 1420245 - Unable to handle window resize from snack-based application
Summary: Unable to handle window resize from snack-based application
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: newt
Version: 6.8
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Miroslav Lichvar
QA Contact: BaseOS QE - Apps
Depends On:
TreeView+ depends on / blocked
Reported: 2017-02-08 09:44 UTC by Roman Valov
Modified: 2017-02-08 11:59 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1432926 (view as bug list)
Last Closed: 2017-02-08 11:59:25 UTC
Target Upstream Version:

Attachments (Terms of Use)
sample code to detect window resize (352 bytes, text/x-python)
2017-02-08 09:44 UTC, Roman Valov
no flags Details

Description Roman Valov 2017-02-08 09:44:17 UTC
Created attachment 1248570 [details]
sample code to detect window resize

Description of problem:
I've written snack-based application to be run on RHEL6 server using Python Snack library. Now I've get claims from our testers that application doesn't handle screen resize. I've check newt source code and found it's assumed to send NEWT_KEY_RESIZE (0x8000 + 113) to application on window resize. But it doesn't happen.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Open Gnome Terminal.
2. Connect using ssh to RHEL6 server.
3. Run attached win.py on server.
4. Resize terminal window.

Actual results:
Nothing happens.

Expected results:
Script exits with 'WINCH' printed.

Additional info:
I've tried to reproduce this problem using Gnome Terminal 3.22.0 and by default my TERM set to `xterm-256color`. Our testers use PuTTY with TERM set to `xterm`.

Comment 1 Miroslav Lichvar 2017-02-08 11:59:25 UTC
There is a special key defined for resize of the screen, but it's not supported as a hotkey in forms. Instead, the form itself tries to refresh the screen when SIGWINCH is detected. Adding resize as a hotkey to a form is an interesting idea. as it would allow the application to better handle the resize.

However, this is unlikely to be added in RHEL6 as it already entered Production Phase 2. If you think this is a critical issue please contact the support and ask that this BZ is re-opened.

Note You need to log in before you can comment on or make changes to this bug.