You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ha...@apache.org on 2013/12/30 14:13:35 UTC

svn commit: r1554205 - /openoffice/trunk/main/vcl/unx/gtk/window/gtkframe.cxx

Author: hanya
Date: Mon Dec 30 13:13:35 2013
New Revision: 1554205

URL: http://svn.apache.org/r1554205
Log:
#i122950# fix duplicated input when input method convert a character on gtk environment

Modified:
    openoffice/trunk/main/vcl/unx/gtk/window/gtkframe.cxx

Modified: openoffice/trunk/main/vcl/unx/gtk/window/gtkframe.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/unx/gtk/window/gtkframe.cxx?rev=1554205&r1=1554204&r2=1554205&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/unx/gtk/window/gtkframe.cxx (original)
+++ openoffice/trunk/main/vcl/unx/gtk/window/gtkframe.cxx Mon Dec 30 13:13:35 2013
@@ -3553,6 +3553,11 @@ void GtkSalFrame::IMHandler::signalIMCom
     {
         GTK_YIELD_GRAB();
         
+        bool bWasPreedit =
+            (pThis->m_aInputEvent.mpTextAttr != 0) ||
+            pThis->m_bPreeditJustChanged;
+        pThis->m_bPreeditJustChanged = false;
+        
         pThis->m_aInputEvent.mnTime 			= 0;
         pThis->m_aInputEvent.mpTextAttr 		= 0;
         pThis->m_aInputEvent.maText 		    = String( pText, RTL_TEXTENCODING_UTF8 );
@@ -3576,9 +3581,7 @@ void GtkSalFrame::IMHandler::signalIMCom
          *  or because there never was a preedit.
          */
         bool bSingleCommit = false;
-        bool bWasPreedit =
-            (pThis->m_aInputEvent.mpTextAttr != 0) ||
-            pThis->m_bPreeditJustChanged;
+        
         if( ! bWasPreedit
             && pThis->m_aInputEvent.maText.Len() == 1
             && ! pThis->m_aPrevKeyPresses.empty()