aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-03-30 17:00:56 +0000
committerVaxry <[email protected]>2024-03-30 17:01:02 +0000
commit77f26997fd00aaec958463414269fa3d8f62bb63 (patch)
tree347f9133e103833f481046c08ca5b974b7d319f8
parent906e49814412921fd6d0e0188416665dd8ef3e0c (diff)
downloadHyprland-77f26997fd00aaec958463414269fa3d8f62bb63.tar.gz
Hyprland-77f26997fd00aaec958463414269fa3d8f62bb63.zip
IME: don't assert on lock mismatch, just fix it
-rw-r--r--src/managers/input/TextInput.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/managers/input/TextInput.cpp b/src/managers/input/TextInput.cpp
index 39a03c91..eeea899d 100644
--- a/src/managers/input/TextInput.cpp
+++ b/src/managers/input/TextInput.cpp
@@ -170,7 +170,11 @@ void CTextInput::enter(wlr_surface* pSurface) {
}
enterLocks++;
- RASSERT(enterLocks == 1, "TextInput had != 1 lock in enter");
+ if (enterLocks != 1) {
+ Debug::log(ERR, "BUG THIS: TextInput has != 1 locks in enter");
+ leave();
+ enterLocks = 1;
+ }
if (pWlrInput)
wlr_text_input_v3_send_enter(pWlrInput, pSurface);
@@ -187,7 +191,10 @@ void CTextInput::leave() {
return;
enterLocks--;
- RASSERT(enterLocks == 0, "TextInput had != 0 locks in leave");
+ if (enterLocks != 1) {
+ Debug::log(ERR, "BUG THIS: TextInput has != 0 locks in leave");
+ enterLocks = 0;
+ }
if (pWlrInput && pWlrInput->focused_surface)
wlr_text_input_v3_send_leave(pWlrInput);