summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-06-16 15:37:05 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-06-18 01:24:34 +0200
commit0c2ca26cd9583092f3ade7b18bc2423336a6202b (patch)
tree946a02f00bbf989565ad0d69dde7d026573f8e6b /tests/auto/widgets
parentb6c5e0667696c1d4abaf37f2224b2121b72cdebd (diff)
macOS: Resend event if the first input method event changes focus
QAbstractItemView opens the editor and changes focus in response to the first QEvent::InputMethod event. Changing focus however cancels the current composition, so the key press is lost and needs to be repeated by the user. What QAbstractItemView does is probably not that unique, so fixing this there - if possible at all - is not a general solution. In the platform specific input method handling code, we can generally discover that the focus object changed in response to the InputMethod event that gets sent to the focus object. On macOS, we can then pass the key event to the input method once more, which works fine. On Windows and X11, the situation is more complicated. That the focus changed is easily discovered, but re-sending the key press in such a way that the input method responds doesn't seem possible. On Windows, using SendInput simply delivers the exact key to the focus object, without starting the expected composition. On X11 with IBus, it should be possible to call ProcessKeyEvent again on the IBus input context when we discover in filterEventFinished that the focus object changed while delivering the event. However, any attempt to do so has no effect. So, for now only fixing this for macOS. Task-number: QTBUG-54848 Change-Id: I0f7b786cfa57430e6a1e7d605415265cf53eb675 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'tests/auto/widgets')
0 files changed, 0 insertions, 0 deletions