~alan-griffiths/qtmir/future-proof

Viewing all changes in revision 630.

  • Committer: Bileto Bot
  • Author(s): Daniel d'Andrada
  • Date: 2017-03-28 17:12:39 UTC
  • mfrom: (625.1.4 keyState)
  • Revision ID: ci-train-bot@canonical.com-20170328171239-nd8gj4bz4srkgof1
Ensure the window that got a key down also gets the corresponding key up

Otherwise it will be left in a inconsistent state (with a pressed key hanging around).

QQuickWindow's input dispatching doesn't guarantee that for its QQuickItem.
So we have to do it ourselves.

This can happen when qml active focus changes in response to a key press.
Eg: client creates a child window in response to a Ctrl+O. By the time the user
releases the Ctrl, active focus will already be in the child window, so the child window
will get the release event instead of the top-level one. (LP: #1671072)

Approved by: Gerry Boland, Unity8 CI Bot

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: