~ci-train-bot/unity8/ubuntu-rtm-14.09-proposed

« back to all changes in this revision

Viewing changes to qml/Shell.qml

  • Committer: CI Train Bot
  • Author(s): Kevin Gunn
  • Date: 2015-01-22 20:46:44 UTC
  • mfrom: (1415.1.4 unity8)
  • Revision ID: ci-train-bot@canonical.com-20150122204644-atelac0sngw9awx9
merge bug fixes from vivid, for bugs 1409003, 1410830, 1413065, 1398427 Fixes: #1398427, #1409003, #1410830, #1413065
Approved by: Michael Zanetti

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
 
158
158
    WindowKeysFilter {
159
159
        Keys.onPressed: {
160
 
            if (event.key == Qt.Key_PowerOff || event.key == Qt.Key_PowerDown) {
161
 
                dialogs.onPowerKeyPressed();
 
160
            // Nokia earpieces give TogglePlayPause, while the iPhone's earpiece gives Play
 
161
            if (event.key == Qt.Key_MediaTogglePlayPause || event.key == Qt.Key_MediaPlay) {
 
162
                event.accepted = callManager.handleMediaKey(false);
 
163
            } else if (event.key == Qt.Key_PowerOff || event.key == Qt.Key_PowerDown) {
 
164
                // FIXME: We only consider power key presses if the screen is
 
165
                // on because of bugs 1410830/1409003.  The theory is that when
 
166
                // those bugs are encountered, there is a >2s delay between the
 
167
                // power press event and the power release event, which causes
 
168
                // the shutdown dialog to appear on resume.  So to avoid that
 
169
                // symptom while we investigate the root cause, we simply won't
 
170
                // initiate any dialogs when the screen is off.
 
171
                if (Powerd.status === Powerd.On) {
 
172
                    dialogs.onPowerKeyPressed();
 
173
                }
162
174
                event.accepted = true;
163
175
            } else {
164
176
                volumeKeyFilter.onKeyPressed(event.key);
610
622
        target: callManager
611
623
 
612
624
        onHasCallsChanged: {
613
 
            if (shell.locked && callManager.hasCalls) {
 
625
            if (shell.locked && callManager.hasCalls && greeter.lockedApp !== "dialer-app") {
614
626
                // We just received an incoming call while locked.  The
615
627
                // indicator will have already launched dialer-app for us, but
616
628
                // there is a race between "hasCalls" changing and the dialer