[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ncurses/Forms unfocus current field
From: |
Leon Winter |
Subject: |
Re: Ncurses/Forms unfocus current field |
Date: |
Mon, 24 Oct 2016 13:11:54 +0200 |
User-agent: |
NeoMutt/20161014 (1.7.1) |
Hi Thomas,
> yes - that would help
see attached patch for the new function "unfocus_current_field".
I'd like to reiterate that some programs might assume that the current field
pointer is always valid [0][1][2] (just a small search for code samples of
usages). However in order to set the field pointer to NULL one has to
deliberately do so. When we introduce the new function and people use it, they
need to make sure their logic can handle a NULL pointer for the current field.
Regards,
Leon
[0]
https://github.com/h4ck3rm1k3/OpenWrt-Firefly-SDK/blob/master/staging_dir/target-mipsel_24kec%2Bdsp_uClibc-0.9.33.2/usr/include/cursesf.h#L480
[1]
https://github.com/gtcasl/hpc-benchmarks/blob/master/parsec-3.0/pkgs/tools/cmake/src/Source/CursesDialog/cmCursesMainForm.cxx#L291
[2]
https://github.com/open-power/petitboot/blob/master/ui/ncurses/nc-widgets.c#L1236
ncurses-unfocus-field.patch
Description: Text Data