429 void CPeninputServer::ActivateSpriteInGlobalNotesL() |
429 void CPeninputServer::ActivateSpriteInGlobalNotesL() |
430 { |
430 { |
431 TBool notDraw = EFalse; |
431 TBool notDraw = EFalse; |
432 |
432 |
433 if(iUiLayout) |
433 if(iUiLayout) |
|
434 { |
|
435 iUiLayout->HandleCommand( ECmdPeninputDisableLayoutDrawing, |
|
436 (unsigned char*)¬Draw ); |
|
437 } |
|
438 |
|
439 // [[[ temporary solution for Virtual keyboard becomes corrupted after several rotations |
|
440 if(!iUiLayout) |
434 { |
441 { |
435 iUiLayout->HandleCommand( ECmdPeninputDisableLayoutDrawing, |
442 return; |
436 (unsigned char*)¬Draw ); |
|
437 } |
443 } |
|
444 |
|
445 // we should not be able to activate and show pen ui if this mode is disabled currently |
|
446 if(iUiLayout->PenInputType() & DisabledByOrientation()) |
|
447 { |
|
448 // we have activate the animation otherwise we will see the penui but not reponse |
|
449 // when clicking on it in the case we rotating the screen quickly and continously |
|
450 if(iAnimObj) |
|
451 { |
|
452 iAnimObj->AddActivationCmd(ECmdActivate,EFalse); |
|
453 } |
|
454 return; |
|
455 } |
|
456 // ]]] temporary solution for Virtual keyboard becomes corrupted after several rotations |
|
457 |
438 if(iActive) |
458 if(iActive) |
439 { |
459 { |
440 if(iUseWindowCtrl) |
460 if(iUseWindowCtrl) |
441 { |
461 { |
442 /* RWsSession &ws = CCoeEnv::Static()->WsSession(); |
462 /* RWsSession &ws = CCoeEnv::Static()->WsSession(); |
443 TInt wgId =ws.GetFocusWindowGroup(); |
463 TInt wgId =ws.GetFocusWindowGroup(); |
444 //TInt wgHandle = ws.GetWindowGroupHandle(wgId); |
464 //TInt wgHandle = ws.GetWindowGroupHandle(wgId); |
445 |
465 |
446 |
466 |
447 TInt priority; |
467 TInt priority; |
448 //TInt pos; |
468 //TInt pos; |
449 //wg.Construct(wgHandle); |
469 //wg.Construct(wgHandle); |
450 //pos = wg.FullOrdinalPosition(); |
470 //pos = wg.FullOrdinalPosition(); |
451 priority = ws.GetWindowGroupOrdinalPriority(wgId);*/ |
471 priority = ws.GetWindowGroupOrdinalPriority(wgId);*/ |
452 //wg.Close(); |
472 //wg.Close(); |
453 //iPenUiCtrl->ShowPenUi(); |
473 //iPenUiCtrl->ShowPenUi(); |
454 ActivatePenUiLayout(EFalse); |
474 ActivatePenUiLayout(EFalse); |
455 iDimmed = EFalse; |
475 iDimmed = EFalse; |
456 iPenUiCtrl->ShowPenUiL(iDimmed); |
476 iPenUiCtrl->ShowPenUiL(iDimmed); |
457 } |
477 } |
458 return; |
478 return; |
459 } |
479 } |
460 |
480 |
461 TBool bNeedWait = AnimOpNeedWaiting(ESignalPenUiActivated); |
481 TBool bNeedWait = AnimOpNeedWaiting(ESignalPenUiActivated); |
462 //add animation command |
482 //add animation command |
463 |
483 |
464 /* |
484 /* |
465 if(iAnimObj->AddActivationCmd(ECmdActivate,bNeedWait)) |
485 if(iAnimObj->AddActivationCmd(ECmdActivate,bNeedWait)) |
466 { |
486 { |
467 if(bNeedWait) |
487 if(bNeedWait) |
468 iForegroundUiHandler->AddDelayedCmd(); |
488 iForegroundUiHandler->AddDelayedCmd(); |
469 //iUiLayout->OnActivate(); |
489 //iUiLayout->OnActivate(); |
470 ActivatePenUiLayout(); |
490 ActivatePenUiLayout(); |
471 |
491 |
472 DrawSprite(); |
492 DrawSprite(); |
473 |
493 |
474 iEventBufferQueue->GetEvent(); |
494 iEventBufferQueue->GetEvent(); |
475 |
495 |
476 iActive = ETrue; |
496 iActive = ETrue; |
477 |
497 |
478 if(iUseWindowCtrl) |
498 if(iUseWindowCtrl) |
479 iPenUiCtrl->ShowPenUi(); |
499 iPenUiCtrl->ShowPenUi(); |
480 } |
500 } |
481 */ |
501 */ |
482 if(ActivatePenUiLayout(bNeedWait)) |
502 if(ActivatePenUiLayout(bNeedWait)) |
483 { |
503 { |
484 if(bNeedWait) |
504 if(bNeedWait) |
485 iForegroundUiHandler->AddDelayedCmd(); |
505 iForegroundUiHandler->AddDelayedCmd(); |
486 |
506 |
487 DrawSprite(); |
507 DrawSprite(); |
488 |
508 |
489 iActive = ETrue; |
509 iActive = ETrue; |
490 |
510 |
491 if(iUseWindowCtrl) |
511 if(iUseWindowCtrl) |
492 { |
512 { |
493 /*RWsSession &ws = CCoeEnv::Static()->WsSession(); |
513 /*RWsSession &ws = CCoeEnv::Static()->WsSession(); |
494 TInt wgId =ws.GetFocusWindowGroup(); |
514 TInt wgId =ws.GetFocusWindowGroup(); |
495 //TInt wgHandle = ws.GetWindowGroupHandle(wgId); |
515 //TInt wgHandle = ws.GetWindowGroupHandle(wgId); |
496 |
516 |
497 |
517 TInt priority; |
498 TInt priority; |
518 //TInt pos; |
499 //TInt pos; |
519 //wg.Construct(wgHandle); |
500 //wg.Construct(wgHandle); |
520 //pos = wg.FullOrdinalPosition(); |
501 //pos = wg.FullOrdinalPosition(); |
521 priority = ws.GetWindowGroupOrdinalPriority(wgId);*/ |
502 priority = ws.GetWindowGroupOrdinalPriority(wgId);*/ |
522 //wg.Close(); |
503 //wg.Close(); |
523 iPenUiCtrl->ShowPenUiL(iDimmed); |
504 iPenUiCtrl->ShowPenUiL(iDimmed); |
524 } |
505 } |
525 } |
506 } |
526 } |
507 } |
527 |
508 // --------------------------------------------------------------------------- |
528 // --------------------------------------------------------------------------- |
509 // CPeninputServer::ActivateSprite |
529 // CPeninputServer::ActivateSprite |
510 // Activate sprite |
530 // Activate sprite |
511 // --------------------------------------------------------------------------- |
531 // --------------------------------------------------------------------------- |
512 // |
532 // |
534 if(!IsGlobalNotesApp(focusApp)) |
554 if(!IsGlobalNotesApp(focusApp)) |
535 iPreNonGloebalNotesWndGrpId = focusApp.iUid; |
555 iPreNonGloebalNotesWndGrpId = focusApp.iUid; |
536 |
556 |
537 if(!iUiLayout) |
557 if(!iUiLayout) |
538 return; |
558 return; |
|
559 |
|
560 // [[[ temporary solution for Virtual keyboard becomes corrupted after several rotations |
|
561 // we should not be able to activate and show pen ui if this mode is disabled currently |
|
562 if(iUiLayout->PenInputType() & DisabledByOrientation()) |
|
563 { |
|
564 // we have activate the animation otherwise we will see the penui but not reponse |
|
565 // when clicking on it in the case we rotating the screen quickly and continously |
|
566 if(iAnimObj) |
|
567 { |
|
568 iAnimObj->AddActivationCmd(ECmdActivate,EFalse); |
|
569 } |
|
570 |
|
571 return; |
|
572 } |
|
573 // ]]] temporary solution for Virtual keyboard becomes corrupted after several rotations |
539 |
574 |
540 TBool notDraw = EFalse; |
575 TBool notDraw = EFalse; |
541 iUiLayout->HandleCommand(ECmdPeninputDisableLayoutDrawing,(unsigned char*)¬Draw); |
576 iUiLayout->HandleCommand(ECmdPeninputDisableLayoutDrawing,(unsigned char*)¬Draw); |
542 |
577 |
543 // move it out from if(!iActive) to make sure that msg bubble can be |
578 // move it out from if(!iActive) to make sure that msg bubble can be |
559 //TBool bNeedWait = AnimOpNeedWaiting(ESignalPenUiActivated); |
594 //TBool bNeedWait = AnimOpNeedWaiting(ESignalPenUiActivated); |
560 //add animation command |
595 //add animation command |
561 |
596 |
562 /* |
597 /* |
563 if(iAnimObj->AddActivationCmd(ECmdActivate,bNeedWait)) |
598 if(iAnimObj->AddActivationCmd(ECmdActivate,bNeedWait)) |
564 { |
599 { |
565 if(bNeedWait) |
600 if(bNeedWait) |
566 iForegroundUiHandler->AddDelayedCmd(); |
601 iForegroundUiHandler->AddDelayedCmd(); |
567 //iUiLayout->OnActivate(); |
602 //iUiLayout->OnActivate(); |
568 ActivatePenUiLayout(); |
603 ActivatePenUiLayout(); |
569 |
604 |
570 DrawSprite(); |
605 DrawSprite(); |
571 |
606 |
572 iEventBufferQueue->GetEvent(); |
607 iEventBufferQueue->GetEvent(); |
573 |
608 |
574 iActive = ETrue; |
609 iActive = ETrue; |
575 |
610 |
576 if(iUseWindowCtrl) |
611 if(iUseWindowCtrl) |
577 iPenUiCtrl->ShowPenUi(); |
612 iPenUiCtrl->ShowPenUi(); |
578 } |
613 } |
579 */ |
614 */ |
580 |
615 |
581 if(ActivatePenUiLayout(bNeedWait, ETrue)) |
616 if(ActivatePenUiLayout(bNeedWait, ETrue)) |
582 { |
617 { |
583 if(bNeedWait) |
618 if(bNeedWait) |
584 iForegroundUiHandler->AddDelayedCmd(); |
619 iForegroundUiHandler->AddDelayedCmd(); |
585 |
620 |
586 DrawSprite(); |
621 DrawSprite(); |
587 |
622 |
588 iActive = ETrue; |
623 iActive = ETrue; |
589 |
624 |
590 if(iUseWindowCtrl) |
625 if(iUseWindowCtrl) |
591 { |
626 { |
592 TRAP_IGNORE( iPenUiCtrl->ShowPenUiL(iDimmed) ); |
627 TRAP_IGNORE( iPenUiCtrl->ShowPenUiL(iDimmed) ); |
593 |
628 |
594 if (iPreNonGloebalNotesWndGrpId != focusApp.iUid && |
629 if (iPreNonGloebalNotesWndGrpId != focusApp.iUid && |
595 IsGlobalNotesApp(focusApp) && !iInGlobalEditorState ) |
630 IsGlobalNotesApp(focusApp) && !iInGlobalEditorState ) |
596 { |
631 { |
597 iDimmed = ETrue; |
632 iDimmed = ETrue; |
598 DimPenUi(); |
633 DimPenUi(); |
599 } |
634 } |
600 } |
635 } |
601 } |
636 } |
602 iIsLayoutReDrawAllowWhenActive = EFalse; |
637 iIsLayoutReDrawAllowWhenActive = EFalse; |
603 } |
638 } |
604 else |
639 else |
605 { |
640 { |
623 { |
658 { |
624 iIsLayoutReDrawAllowWhenActive = EFalse; |
659 iIsLayoutReDrawAllowWhenActive = EFalse; |
625 } |
660 } |
626 } |
661 } |
627 else |
662 else |
628 { |
663 { |
629 ActivatePenUiLayout(EFalse,ETrue); |
664 ActivatePenUiLayout(EFalse,ETrue); |
630 } |
665 } |
631 |
666 |
632 if (iDimmed && (iInGlobalNotesApp || iInGlobalEditorState)) |
667 if (iDimmed && (iInGlobalNotesApp || iInGlobalEditorState)) |
633 { |
668 { |
634 DeactivatePenUiLayout(EFalse); |
669 DeactivatePenUiLayout(EFalse); |
635 return; |
670 return; |
636 } |
671 } |
637 |
672 |
638 TRAP_IGNORE( iPenUiCtrl->ShowPenUiL(iDimmed) ); |
673 TRAP_IGNORE( iPenUiCtrl->ShowPenUiL(iDimmed) ); |
639 iDimmed = EFalse; |
674 iDimmed = EFalse; |
640 } |
675 } |
641 } |
676 } |
642 } |
677 } |
643 |
678 |
644 // --------------------------------------------------------------------------- |
679 // --------------------------------------------------------------------------- |
645 // CPeninputServer::ActivatePenUiLayout |
680 // CPeninputServer::ActivatePenUiLayout |
646 // --------------------------------------------------------------------------- |
681 // --------------------------------------------------------------------------- |