summaryrefslogtreecommitdiffstats
path: root/examples/widgets
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-10-14 17:58:50 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-10-16 14:33:29 +0200
commit3007050db74705f14515908b3c20ef5d1963d895 (patch)
tree8f6b1791f06026dff5f8995ad1e418b7c5151b4d /examples/widgets
parent0488fde04200c4d622e46bb60a1dc2b438f50b11 (diff)
macOS: Pass on mouse press if input context didn't handle it
We follow the approach of [NSTextView mouseDown:] by bailing out if the input context handled the event, and otherwise passing it along to the input item. This allows moving the cursor with a single click in the input item, which will also commit the current preedit string as is, depending on the input context. For some reason 2-Set Korean input results in plain insertText calls for each step of the composition with an NSTextView, while we get marked text. The result is that when composing with 2-Set Korean, a native NSTextView will only require a single click to move the cursor, while for us it requires two, since the input context says it handled the event. We opt to follow the behavior of NSTextView to bail out if the input context handled the event, instead of trying to emulate the observed behavior for 2-Set Korean by always passing the mouse event on, as the former seems like a safer approach. This is also in line with the recommendations from Apple: https://lists.apple.com/archives/cocoa-dev/2012/May/msg00539.html Pick-to: 6.2 Change-Id: I372ac62ee3b8b20531cd7cfa2d412a5efea3eb68 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples/widgets')
0 files changed, 0 insertions, 0 deletions