3149 { |
3149 { |
3150 if ( !focused ) |
3150 if ( !focused ) |
3151 { |
3151 { |
3152 TRAP_IGNORE( edwinState->ReportAknEdStateEventL( |
3152 TRAP_IGNORE( edwinState->ReportAknEdStateEventL( |
3153 MAknEdStateObserver::EAknSyncEdwinState ) ); |
3153 MAknEdStateObserver::EAknSyncEdwinState ) ); |
3154 if ( edwinState->Flags() & EAknEditorFlagHideTextView ) |
3154 // if text view is already hidden and editor loses focus, display text view. |
|
3155 if ( ( edwinState->Flags() & EAknEditorFlagHideTextView ) && |
|
3156 ( iEdwinExtension && iEdwinExtension->iTextViewHidden ) ) |
3155 { |
3157 { |
3156 iTextView->MakeVisible( ETrue ); |
3158 iTextView->MakeVisible( ETrue ); |
3157 edwinState->SetFlags( edwinState->Flags() & |
3159 edwinState->SetFlags( edwinState->Flags() & |
3158 ~EAknEditorFlagHideTextView ); |
3160 ~EAknEditorFlagHideTextView ); |
|
3161 iEdwinExtension->iTextViewHidden = EFalse; |
|
3162 DrawDeferred(); |
3159 } |
3163 } |
3160 } |
3164 } |
3161 else |
3165 else |
3162 { |
3166 { |
3163 if ( edwinState->Flags() & EAknEditorFlagLaunchPenInputAutomatic && |
3167 if ( edwinState->Flags() & EAknEditorFlagLaunchPenInputAutomatic && |
8514 if ( chinesePopup != ( aNewFlags & EAknEditorFlagChinesePopup ) ) |
8518 if ( chinesePopup != ( aNewFlags & EAknEditorFlagChinesePopup ) ) |
8515 { |
8519 { |
8516 TRAP_IGNORE( ReportChinesePopupEventL( chinesePopup == 0 ) ); |
8520 TRAP_IGNORE( ReportChinesePopupEventL( chinesePopup == 0 ) ); |
8517 } |
8521 } |
8518 |
8522 |
8519 if ( iTextView ) |
8523 // To reduce power consumption, text view should be hidden when full screen Touch |
8520 { |
8524 // Input is open and editor is covered by it, for user can not see editor in this |
8521 if ( ( aNewFlags & EAknEditorFlagHideTextView ) |
8525 // case. When full screen Touch Input is open, FEP will set flag EAknEditorFlagHideTextView |
8522 && !( aOldFlags & EAknEditorFlagHideTextView ) ) |
8526 // to notify editor the text view should be hidden. But we have to check if the feature |
|
8527 // of partial screen input is enabled at the same time, for full screen Touch Input window |
|
8528 // will only occupy part of the screen if the feature is eanbled and editor is still visible |
|
8529 // to user. So editor can only be hidden in such situation: full screen Touch Input is open |
|
8530 // and partial screen feature is disabled. |
|
8531 // In the contrary situations (full screen touch input is closed or partial screen |
|
8532 // feature is enabled), text view has to be shown so editor can work as normal. |
|
8533 if ( iTextView && iEdwinExtension ) |
|
8534 { |
|
8535 TBool textViewHideEnabled( ( aNewFlags & EAknEditorFlagHideTextView ) && |
|
8536 !( aOldFlags & EAknEditorFlagHideTextView ) ); |
|
8537 |
|
8538 TBool textViewHideDisabled( !( aNewFlags & EAknEditorFlagHideTextView ) && |
|
8539 ( aOldFlags & EAknEditorFlagHideTextView ) ); |
|
8540 |
|
8541 TBool partialScreenEnabled( ( aNewFlags & EAknEditorFlagEnablePartialScreen ) && |
|
8542 !( aOldFlags & EAknEditorFlagEnablePartialScreen ) ); |
|
8543 |
|
8544 TBool partialScreenDisabled( !( aNewFlags & EAknEditorFlagEnablePartialScreen ) && |
|
8545 ( aOldFlags & EAknEditorFlagEnablePartialScreen ) ); |
|
8546 |
|
8547 if ( ( textViewHideEnabled && |
|
8548 !( aNewFlags & EAknEditorFlagEnablePartialScreen ) ) || |
|
8549 ( partialScreenDisabled && ( aNewFlags & EAknEditorFlagHideTextView ) ) ) |
8523 { |
8550 { |
8524 iTextView->MakeVisible( EFalse ); |
8551 iTextView->MakeVisible( EFalse ); |
8525 } |
8552 iEdwinExtension->iTextViewHidden = ETrue; |
8526 else if ( ( aOldFlags & EAknEditorFlagTouchInputModeOpened ) |
8553 } |
8527 && !( aNewFlags & EAknEditorFlagTouchInputModeOpened ) ) |
8554 else if ( iEdwinExtension->iTextViewHidden && ( textViewHideDisabled || partialScreenEnabled ) ) |
8528 { |
8555 { |
8529 iTextView->MakeVisible( ETrue ); |
8556 iTextView->MakeVisible( ETrue ); |
8530 DrawNow(); |
8557 DrawNow(); |
|
8558 iEdwinExtension->iTextViewHidden = EFalse; |
8531 } |
8559 } |
8532 } |
8560 } |
8533 } |
8561 } |
8534 |
8562 |
8535 void CEikEdwin::ReportChinesePopupEventL( TBool aChinesePopupOpen ) |
8563 void CEikEdwin::ReportChinesePopupEventL( TBool aChinesePopupOpen ) |