From acf15e5579a5d2bbbe4a13e87306445e31ea5e4f Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 24 Mar 2024 15:00:00 +0000 Subject: [PATCH] text-input: reset lock counter on surface destroy fixes #5231 --- src/managers/input/TextInput.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/managers/input/TextInput.cpp b/src/managers/input/TextInput.cpp index 827d4dbe..c42d4f1f 100644 --- a/src/managers/input/TextInput.cpp +++ b/src/managers/input/TextInput.cpp @@ -127,6 +127,8 @@ void CTextInput::setFocusedSurface(wlr_surface* pSurface) { [this](void* owner, void* data) { Debug::log(LOG, "Unmap TI owner1"); + if (enterLocks) + enterLocks--; pFocusedSurface = nullptr; hyprListener_surfaceUnmapped.removeCallback(); hyprListener_surfaceDestroyed.removeCallback(); @@ -138,6 +140,8 @@ void CTextInput::setFocusedSurface(wlr_surface* pSurface) { [this](void* owner, void* data) { Debug::log(LOG, "destroy TI owner1"); + if (enterLocks) + enterLocks--; pFocusedSurface = nullptr; hyprListener_surfaceUnmapped.removeCallback(); hyprListener_surfaceDestroyed.removeCallback();