textinputv3: implement enableSurface() and disableSurface()


When enter() happens, it got enabled unconditionally. Then in
QWaylandInputContext::setFocusObject(), we need to enable() or
disable() it based on real situation.(If previous enter is
not valid on the QObject, it will be disabled by
disableSurface().)

It fixes the issue for wayfire and kwin/plasma 6. Sway still
has issues with input method events with popup menu, with and
without this patch.(Sway doesn't make keyboard_leave/enter
after surface_enter of popups.) See also
https://github.com/swaywm/sway/issues/4406

Fixes: QTBUG-132196
Pick-to: 6.9 6.8
Done-with: Liang Qi <liang.qi@qt.io>
Change-Id: I5b29a86e0256868c8bcbe48f936c09ee013728a6
Reviewed-by: Liang Qi <liang.qi@qt.io>
commita5ed02659fc78a8f85bac314baf007bfaf30c6f3
parent3f1f5842badff309f7d488993368f1dabdac1ac2
authorInho Lee <inho.lee@qt.io>
committerInho Lee <inho.lee@qt.io>
commit timeFri, 7 Feb 2025 09:43:47 +0100