From c5f08d62d148159f9a20ac386a6186638fe6e508 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 22 Mar 2023 15:59:34 +0200 Subject: [PATCH] Use proper signal to get notified when to reset virtual keyboard geometry Currently, input method relies on the fact that QObject::destroyed and Window::closed are equivalent. But it's going to change, so make the input method use a signal that's semantically better. --- src/inputmethod.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inputmethod.cpp b/src/inputmethod.cpp index f2e33a10a0..b386f41807 100644 --- a/src/inputmethod.cpp +++ b/src/inputmethod.cpp @@ -235,7 +235,7 @@ void InputMethod::setPanel(InputPanelV1Window *panel) m_panel = panel; connect(panel->surface(), &SurfaceInterface::inputChanged, this, &InputMethod::updateInputPanelState); - connect(panel, &QObject::destroyed, this, [this] { + connect(panel, &Window::closed, this, [this]() { if (m_trackedWindow) { m_trackedWindow->setVirtualKeyboardGeometry({}); }