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:
parent
8013130a7b
commit
d13a291828
@ -46,6 +46,7 @@ QWaylandTextInputv2::~QWaylandTextInputv2()
|
|||||||
{
|
{
|
||||||
if (m_resetCallback)
|
if (m_resetCallback)
|
||||||
wl_callback_destroy(m_resetCallback);
|
wl_callback_destroy(m_resetCallback);
|
||||||
|
destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWaylandTextInputv2::reset()
|
void QWaylandTextInputv2::reset()
|
||||||
|
@ -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)
|
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);
|
Q_UNUSED(seatResource);
|
||||||
|
add(resource->client(), id, resource->version());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace MockCompositor
|
} // namespace MockCompositor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user