equal
deleted
inserted
replaced
1 // Copyright (c) 1995-2010 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
513 if (*pData.UInt!=0) // Ignore null handle |
513 if (*pData.UInt!=0) // Ignore null handle |
514 { |
514 { |
515 CWsObject *destroyObj = iWsOwner->HandleToObj(*pData.UInt, WS_HANDLE_CAPTURE_KEY); |
515 CWsObject *destroyObj = iWsOwner->HandleToObj(*pData.UInt, WS_HANDLE_CAPTURE_KEY); |
516 if (destroyObj) |
516 if (destroyObj) |
517 { |
517 { |
518 // Cancel any repeat that is underway for this capture |
518 //Cancel any repeat that is underway for this key |
519 CKeyboardRepeat::CancelRepeat(destroyObj, EFalse); |
519 const TWsWinCmdCaptureKey& capKey(*pData.CaptureKey); |
|
520 CKeyboardRepeat::CancelRepeat(this,capKey.key,EFalse,capKey.modifierMask); |
520 delete destroyObj; |
521 delete destroyObj; |
521 } |
522 } |
522 else |
523 else |
523 { |
524 { |
524 #ifdef _DEBUG |
525 #ifdef _DEBUG |
532 if (*pData.UInt!=0) // Ignore null handle |
533 if (*pData.UInt!=0) // Ignore null handle |
533 { |
534 { |
534 CWsObject *destroyObj = iWsOwner->HandleToObj(*pData.UInt, WS_HANDLE_CAPTURE_KEY_UPDOWNS); |
535 CWsObject *destroyObj = iWsOwner->HandleToObj(*pData.UInt, WS_HANDLE_CAPTURE_KEY_UPDOWNS); |
535 if (destroyObj) |
536 if (destroyObj) |
536 { |
537 { |
|
538 //Cancel any repeat that is underway for this key |
|
539 const TWsWinCmdCaptureKey& capKey(*pData.CaptureKey); |
|
540 CKeyboardRepeat::CancelRepeat(this,capKey.key,EFalse,capKey.modifierMask); |
537 delete destroyObj; |
541 delete destroyObj; |
538 } |
542 } |
539 else |
543 else |
540 { |
544 { |
541 #ifdef _DEBUG |
545 #ifdef _DEBUG |
549 if (*pData.UInt!=0) // Ignore null handle |
553 if (*pData.UInt!=0) // Ignore null handle |
550 { |
554 { |
551 CWsObject *destroyObj = iWsOwner->HandleToObj(*pData.UInt, WS_HANDLE_CAPTURE_LONG_KEY); |
555 CWsObject *destroyObj = iWsOwner->HandleToObj(*pData.UInt, WS_HANDLE_CAPTURE_LONG_KEY); |
552 if (destroyObj) |
556 if (destroyObj) |
553 { |
557 { |
554 // Cancel any repeat that is underway for this capture |
558 //Cancel any repeat that is underway for this key |
555 CKeyboardRepeat::CancelRepeat(destroyObj, ETrue); |
559 const TWsWinCmdCaptureLongKey& capKey(*pData.CaptureLongKey); |
|
560 CKeyboardRepeat::CancelRepeat(this,capKey.inputKey,ETrue,capKey.modifierMask); |
556 delete destroyObj; |
561 delete destroyObj; |
557 } |
562 } |
558 else |
563 else |
559 { |
564 { |
560 #ifdef _DEBUG |
565 #ifdef _DEBUG |
899 } |
904 } |
900 |
905 |
901 TBool CWsWindowGroup::SetOrdinalPosition(TInt aPos,CWsWindowGroup* aClosingWindow) |
906 TBool CWsWindowGroup::SetOrdinalPosition(TInt aPos,CWsWindowGroup* aClosingWindow) |
902 { |
907 { |
903 TBool ret=ETrue; |
908 TBool ret=ETrue; |
904 |
|
905 // Remember if the window group tree is actually changed or not, so that we know whether to |
|
906 // check the render orientation after the re-ordering is done ( see CWsTop::CheckRenderOrientation() |
|
907 // call at end of this method |
|
908 TBool changed = CheckOrdinalPositionChange(aPos); |
|
909 |
|
910 if (!iQueue) |
909 if (!iQueue) |
911 ret=DoSetOrdinalPosition1(aPos,aClosingWindow); |
910 ret=DoSetOrdinalPosition1(aPos,aClosingWindow); |
912 else |
911 else |
913 { |
912 { |
914 TDblQueIter<CWsWindowGroup> iter(*iQueue); |
913 TDblQueIter<CWsWindowGroup> iter(*iQueue); |
961 } |
960 } |
962 WS_ASSERT_DEBUG(ok, EWsPanicGroupWindowChainError); |
961 WS_ASSERT_DEBUG(ok, EWsPanicGroupWindowChainError); |
963 #endif |
962 #endif |
964 } |
963 } |
965 |
964 |
966 // If the ordinal positions have changed, check to see if there is a new render orientation |
|
967 // and publish it if so |
|
968 if(changed) |
|
969 CWsTop::CheckRenderOrientation(); |
|
970 |
|
971 return ret; |
965 return ret; |
972 } |
966 } |
973 |
967 |
974 |
968 |
975 void CWsWindowGroup::MoveChainedWindows(TDblQueIter<CWsWindowGroup>& aIter,TBool aForward,TInt aPos,CWsWindowGroup* aClosingWindow) |
969 void CWsWindowGroup::MoveChainedWindows(TDblQueIter<CWsWindowGroup>& aIter,TBool aForward,TInt aPos,CWsWindowGroup* aClosingWindow) |
1352 delete pk; |
1346 delete pk; |
1353 pk=next; |
1347 pk=next; |
1354 } |
1348 } |
1355 } |
1349 } |
1356 |
1350 |
1357 TBool CWsWindowGroup::CheckForPriorityKey(const TKeyEvent &aKeyEvent) |
1351 TBool CWsWindowGroup::CheckForPriorityKey(const TKeyData &aKey, TInt aScanCode) |
1358 { |
1352 { |
1359 for(TPriorityKey *pk=iPriorityKeys;pk;pk=pk->iNext) |
1353 for(TPriorityKey *pk=iPriorityKeys;pk;pk=pk->iNext) |
1360 { |
1354 { |
1361 if (pk->KeyMatches(aKeyEvent)) |
1355 if (pk->KeyMatches(aKey)) |
1362 { |
1356 { |
1363 WsOwner()->PriorityKeyPressed(ClientHandle(), aKeyEvent); |
1357 WsOwner()->PriorityKeyPressed(ClientHandle(),aKey, aScanCode); |
1364 return(ETrue); |
1358 return(ETrue); |
1365 } |
1359 } |
1366 } |
1360 } |
1367 return(EFalse); |
1361 return(EFalse); |
1368 } |
1362 } |