Prefer text-input-v2 over text-input-v3 for now

Qt's current text-input-v3 is converted from text-input-v4, but it's
current state is poor and does not support the same feature like v2.
KWin is the only major party that implements text-input-v2 and many
feature e.g. Plasma-mobile would require v2 feature to provide the
complete support. Until v3 is as good as v2, prefer v2 over v3 should
provide a smoother experience on KWin (for both 5/6) out of box and
won't affect other compositor.

Pick-to: 6.7
Change-Id: Iebfe20cfd61f4a96018c4d41a9c4c706b18c7199
Reviewed-by: David Edmundson <davidedmundson@kde.org>
This commit is contained in:
Weng Xuetian 2024-02-11 15:30:42 -08:00
parent 88b3411b87
commit 6529e2386f

View File

@ -558,13 +558,17 @@ void QWaylandDisplay::blockingReadEvents()
void QWaylandDisplay::checkTextInputProtocol()
{
QStringList tips, timps; // for text input protocols and text input manager protocols
// zwp_text_input_v2 is preferred over zwp_text_input_v3 because:
// - Currently, v3 is not as feature rich as v2.
// - While v2 is not upstreamed, it is well supported by KWin since Plasma 5 and Plasma
// Mobile uses some v2 only.
tips << QLatin1String(QtWayland::qt_text_input_method_v1::interface()->name)
<< QLatin1String(QtWayland::zwp_text_input_v3::interface()->name)
<< QLatin1String(QtWayland::zwp_text_input_v2::interface()->name)
<< QLatin1String(QtWayland::zwp_text_input_v3::interface()->name)
<< QLatin1String(QtWayland::zwp_text_input_v1::interface()->name);
timps << QLatin1String(QtWayland::qt_text_input_method_manager_v1::interface()->name)
<< QLatin1String(QtWayland::zwp_text_input_manager_v3::interface()->name)
<< QLatin1String(QtWayland::zwp_text_input_manager_v2::interface()->name)
<< QLatin1String(QtWayland::zwp_text_input_manager_v3::interface()->name)
<< QLatin1String(QtWayland::zwp_text_input_manager_v1::interface()->name);
QString tiProtocols = QString::fromLocal8Bit(qgetenv("QT_WAYLAND_TEXT_INPUT_PROTOCOL"));