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.
This commit is contained in:
parent
2dca6cd003
commit
c5f08d62d1
1 changed files with 1 additions and 1 deletions
|
@ -235,7 +235,7 @@ void InputMethod::setPanel(InputPanelV1Window *panel)
|
||||||
|
|
||||||
m_panel = panel;
|
m_panel = panel;
|
||||||
connect(panel->surface(), &SurfaceInterface::inputChanged, this, &InputMethod::updateInputPanelState);
|
connect(panel->surface(), &SurfaceInterface::inputChanged, this, &InputMethod::updateInputPanelState);
|
||||||
connect(panel, &QObject::destroyed, this, [this] {
|
connect(panel, &Window::closed, this, [this]() {
|
||||||
if (m_trackedWindow) {
|
if (m_trackedWindow) {
|
||||||
m_trackedWindow->setVirtualKeyboardGeometry({});
|
m_trackedWindow->setVirtualKeyboardGeometry({});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue