client: Clean up text input proxy object in textinputv2

This not only cleans up a tiny amount of memory, but also fixes a
potential crash if a wayland event were to arrive on the object after
the Qt level wrapper is destroyed.

Pick-to: 6.5 6.6 6.7
Change-Id: I6fafdd848d61da893304c4467a57b52d3771c508
Reviewed-by: Liang Qi <liang.qi@qt.io>
This commit is contained in:
David Edmundson 2023-12-15 08:57:47 +00:00 committed by Liang Qi
parent 8013130a7b
commit d13a291828
2 changed files with 2 additions and 2 deletions

View File

@ -46,6 +46,7 @@ QWaylandTextInputv2::~QWaylandTextInputv2()
{
if (m_resetCallback)
wl_callback_destroy(m_resetCallback);
destroy();
}
void QWaylandTextInputv2::reset()

View File

@ -12,9 +12,8 @@ TextInputManager::TextInputManager(CoreCompositor *compositor)
void TextInputManager::zwp_text_input_manager_v2_get_text_input(Resource *resource, uint32_t id, wl_resource *seatResource)
{
Q_UNUSED(resource);
Q_UNUSED(id);
Q_UNUSED(seatResource);
add(resource->client(), id, resource->version());
}
} // namespace MockCompositor