From b3e32ca60c4af24bea2d456c0c65572edfaec7fd Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Tue, 29 Oct 2019 12:48:18 -0300 Subject: [PATCH] Fixing "locked" signal on disconnect. --- src/core/host.c | 3 +++ src/core/state.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/host.c b/src/core/host.c index fc64e3c..bda3357 100644 --- a/src/core/host.c +++ b/src/core/host.c @@ -49,6 +49,7 @@ #include "utilc.h" #include "xioc.h" #include "../ssl/crl.h" +#include "screenc.h" #include #include @@ -182,6 +183,8 @@ void lib3270_set_disconnected(H3270 *hSession) CHECK_SESSION_HANDLE(hSession); lib3270_set_cstate(hSession,LIB3270_NOT_CONNECTED); + mcursor_set(hSession,LIB3270_POINTER_LOCKED); + hSession->starting = 0; #if defined(HAVE_LIBSSL) diff --git a/src/core/state.c b/src/core/state.c index 4f9f40f..1f59643 100644 --- a/src/core/state.c +++ b/src/core/state.c @@ -88,7 +88,7 @@ LIB3270_EXPORT int lib3270_in_e(const H3270 *h) LIB3270_EXPORT int lib3270_is_unlocked(const H3270 *h) { - return h->pointer == LIB3270_POINTER_UNLOCKED; + return (h->pointer == LIB3270_POINTER_UNLOCKED) && lib3270_is_connected(h); } -- libgit2 0.21.2