1523 // (other items were commented in a header) |
1532 // (other items were commented in a header) |
1524 // --------------------------------------------------------------------------- |
1533 // --------------------------------------------------------------------------- |
1525 // |
1534 // |
1526 void CAknFepPluginManager::OnResourceChangedL( TInt aType ) |
1535 void CAknFepPluginManager::OnResourceChangedL( TInt aType ) |
1527 { |
1536 { |
1528 if ( !iCurrentPluginInputFepUI || !iPenInputServer.IsForeground() || |
1537 if ( !iCurrentPluginInputFepUI |
1529 iPluginInputMode == EPluginInputModeNone ) |
1538 || iPluginInputMode == EPluginInputModeNone ) |
1530 { |
1539 { |
1531 return; |
1540 return; |
1532 } |
1541 } |
1533 |
1542 |
1534 if ( (iPluginInputMode == EPluginInputModeFSQ || (iPluginInputMode == EPluginInputModeFingerHwr |
1543 if ( (iPluginInputMode == EPluginInputModeFSQ || (iPluginInputMode == EPluginInputModeFingerHwr |
1535 && iSharedData.InputTextLanguage() == ELangArabic)) |
1544 && iSharedData.InputTextLanguage() == ELangArabic)) |
1536 && !iSharedData.AutoRotateEnabled() ) |
1545 && !iSharedData.AutoRotateEnabled() ) |
1537 { |
1546 { |
1538 return; |
1547 return; |
1539 } |
1548 } |
1540 |
1549 |
|
1550 TInt preInputMode = iPluginInputMode; |
|
1551 if ( iSharedData.AutoRotateEnabled() && |
|
1552 ( preInputMode == EPluginInputModeFSQ || preInputMode == EPluginInputModeItut ) ) |
|
1553 { |
|
1554 // Calculate current input mode by orientation. |
|
1555 // even though peninputserver is brought to backgroud, |
|
1556 // the value for current input mode also needs to be ready. |
|
1557 // For example, when open task switcher, pen ui is invisible and peniput server is background, |
|
1558 // then switch orientation... |
|
1559 // After that when focus go back to editor, config FEP must be done before pen ui open, |
|
1560 // And FEP must know for which kind of input method it configur. |
|
1561 TPixelsTwipsAndRotation size; |
|
1562 CCoeEnv::Static()->ScreenDevice()->GetDefaultScreenSizeAndRotation(size); |
|
1563 iPluginInputMode = ( size.iPixelSize.iWidth < size.iPixelSize.iHeight ) ? |
|
1564 EPluginInputModeItut : EPluginInputModeFSQ; |
|
1565 } |
|
1566 |
|
1567 if ( !iPenInputServer.IsForeground() ) |
|
1568 { |
|
1569 return; |
|
1570 } |
|
1571 |
1541 TBool setResChange = EFalse; |
1572 TBool setResChange = EFalse; |
1542 |
1573 |
1543 if (iPluginInputMode == EPluginInputModeItut || |
1574 if ( preInputMode == EPluginInputModeItut || |
1544 iPluginInputMode == EPluginInputModeFSQ || |
1575 preInputMode == EPluginInputModeFSQ || |
1545 iPluginInputMode == EPluginInputModeFingerHwr) |
1576 preInputMode == EPluginInputModeFingerHwr ) |
1546 { |
1577 { |
1547 setResChange = ETrue; |
1578 setResChange = ETrue; |
1548 iPenInputServer.SetResourceChange(ETrue); |
1579 iPenInputServer.SetResourceChange(ETrue); |
1549 } |
1580 } |
1550 |
1581 |
1551 iResourceChange = ETrue; |
1582 iResourceChange = ETrue; |
1552 |
1583 |
1553 TBool needToChangeInputMode = ETrue; |
1584 TBool needToChangeInputMode = ETrue; |
1554 if ( iSharedData.AutoRotateEnabled() && |
1585 if ( iSharedData.AutoRotateEnabled() && |
1555 ( iPluginInputMode == EPluginInputModeFSQ || iPluginInputMode == EPluginInputModeItut ) ) |
1586 ( preInputMode == EPluginInputModeFSQ || preInputMode == EPluginInputModeItut ) ) |
1556 { |
1587 { |
1557 if ( IsSpellVisible() ) |
1588 if ( IsSpellVisible() ) |
1558 { |
1589 { |
1559 iFepMan.ExitPluginSpellModeByCancel(); |
1590 iFepMan.ExitPluginSpellModeByCancel(); |
1560 iFepMan.SetNotifyPlugin( EFalse ); |
1591 iFepMan.SetNotifyPlugin( EFalse ); |
1561 iFepMan.HandleChangeInFocusForSettingFep(); |
1592 iFepMan.HandleChangeInFocusForSettingFep(); |
1562 iFepMan.SetNotifyPlugin( ETrue ); |
1593 iFepMan.SetNotifyPlugin( ETrue ); |
1563 } |
1594 } |
1564 TPixelsTwipsAndRotation size; |
1595 |
1565 CCoeEnv::Static()->ScreenDevice()->GetDefaultScreenSizeAndRotation(size); |
1596 if ( iPenInputMenu && iPenInputMenu->IsShowing() ) |
1566 |
1597 { |
1567 TPluginInputMode inputModeBeforeOri = ( size.iPixelSize.iWidth < size.iPixelSize.iHeight ) ? |
1598 iPenInputMenu->Hide(); |
1568 EPluginInputModeItut : EPluginInputModeFSQ; |
1599 ResetMenuState(EFalse); |
1569 |
1600 } |
1570 if ( iPenInputMenu && iPenInputMenu->IsShowing() ) |
|
1571 { |
|
1572 iPenInputMenu->Hide(); |
|
1573 ResetMenuState(EFalse); |
|
1574 } |
|
1575 |
1601 |
1576 if(inputModeBeforeOri != iPluginInputMode) |
1602 if( preInputMode != iPluginInputMode ) |
1577 { |
1603 { |
1578 iPluginInputMode = inputModeBeforeOri; |
1604 ClosePluginInputModeL(ETrue); |
1579 ClosePluginInputModeL(ETrue); |
|
1580 iFepMan.TryCloseUiL(); |
1605 iFepMan.TryCloseUiL(); |
1581 } |
1606 } |
1582 else |
1607 else |
1583 { |
1608 { |
1584 needToChangeInputMode = EFalse; |
1609 needToChangeInputMode = EFalse; |