{
mImpl->SendSelectionToClipboard( true ); // Synchronous call to modify text
mImpl->mOperationsPending = ALL_OPERATIONS;
+
+ // This is to reset the virtual keyboard to Upper-case
+ if( 0u == mImpl->mLogicalModel->mText.Count() )
+ {
+ NotifyImfManager();
+ }
+
if( 0u != mImpl->mLogicalModel->mText.Count() ||
!mImpl->IsPlaceholderAvailable() )
{
if( removed )
{
+ // This is to reset the virtual keyboard to Upper-case
+ if( 0u == mImpl->mLogicalModel->mText.Count() )
+ {
+ NotifyImfManager();
+ }
+
if( 0u != mImpl->mLogicalModel->mText.Count() ||
!mImpl->IsPlaceholderAvailable() )
{
return removed;
}
+void Controller::NotifyImfManager()
+{
+ ImfManager imfManager = ImfManager::Get();
+
+ if( imfManager )
+ {
+ // Notifying IMF of a cursor change triggers a surrounding text request so updating it now.
+ std::string text;
+ GetText( text );
+ imfManager.SetSurroundingText( text );
+
+ imfManager.SetCursorPosition( GetLogicalCursorPosition() );
+ imfManager.NotifyCursorPosition();
+ }
+}
+
void Controller::ShowPlaceholderText()
{
if( mImpl->IsPlaceholderAvailable() )
bool BackspaceKeyEvent();
/**
+ * @brief Helper to notify IMF manager with surrounding text & cursor changes.
+ */
+ void NotifyImfManager();
+
+ /**
* @brief Helper to clear font-specific data.
*/
void ShowPlaceholderText();