diff --git a/src/core/properties/boolean.c b/src/core/properties/boolean.c index 77d971f..e4e74ac 100644 --- a/src/core/properties/boolean.c +++ b/src/core/properties/boolean.c @@ -55,6 +55,10 @@ LIB3270_EXPORT int lib3270_ssl_get_crl_download(const H3270 *hSession) { return hSession->ssl.download_crl; } +LIB3270_EXPORT int lib3270_is_editable(const H3270 *hSession) { + return (hSession->pointer & 0x03) == LIB3270_POINTER_UNLOCKED; +} + const LIB3270_INT_PROPERTY * lib3270_get_boolean_properties_list(void) { static const LIB3270_INT_PROPERTY properties[] = { @@ -194,6 +198,13 @@ const LIB3270_INT_PROPERTY * lib3270_get_boolean_properties_list(void) { }, { + .name = "editable", // Property name. + .description = N_( "Non zero if the terminal is editable" ), // Property description. + .get = lib3270_is_editable, // Get value. + .set = NULL // Set value. + }, + + { .name = "crl_download", // Property name. .description = N_( "Non zero if the download of CRL is enabled" ), // Property description. .get = lib3270_ssl_get_crl_download, // Get value. diff --git a/src/core/screen.c b/src/core/screen.c index 2978bf0..50766a6 100644 --- a/src/core/screen.c +++ b/src/core/screen.c @@ -672,6 +672,7 @@ static void status_3270_mode(H3270 *hSession, int GNUC_UNUSED(ignored), void GNU } void mcursor_set(H3270 *hSession,LIB3270_POINTER m) { + if(hSession->pointer != ((unsigned short) m)) { // Pointer changed diff --git a/src/include/lib3270.h b/src/include/lib3270.h index b88a817..659ce8c 100644 --- a/src/include/lib3270.h +++ b/src/include/lib3270.h @@ -994,6 +994,7 @@ LIB3270_EXPORT int lib3270_in_e(const H3270 *h); LIB3270_EXPORT int lib3270_is_ready(const H3270 *h); LIB3270_EXPORT int lib3270_is_secure(const H3270 *h); +LIB3270_EXPORT int lib3270_is_editable(const H3270 *h); LIB3270_EXPORT LIB3270_MESSAGE lib3270_get_lock_status(const H3270 *h); -- libgit2 0.21.2