diff options
| author | Hodong Kim <unknown> | 2019-06-22 16:28:54 +1000 | 
|---|---|---|
| committer | Hodong Kim <unknown> | 2019-06-22 16:28:54 +1000 | 
| commit | 6874c57e9db4376d7ca79a6bb91e460cd7320ec1 (patch) | |
| tree | 4c8c6928a63fffd60a5305429d4c762661018ebc | |
| parent | c4eba25f6e0bf6ce502ae5cc8c23f7acd1d9d292 (diff) | |
| download | scintilla-mirror-6874c57e9db4376d7ca79a6bb91e460cd7320ec1.tar.gz | |
Bug [#2111]. Reset IME when mouse is clicked on GTK.
| -rw-r--r-- | doc/ScintillaHistory.html | 6 | ||||
| -rw-r--r-- | gtk/ScintillaGTK.cxx | 7 | 
2 files changed, 13 insertions, 0 deletions
| diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index d86275450..6afe98657 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -543,6 +543,8 @@  	<td>Andrea Ricchi</td>  	<td>Juarez Rudsatz</td>  	<td>Wil van Antwerpen</td> +      </tr><tr> +	<td>Hodong Kim</td>      </tr>      </table>      <p> @@ -580,6 +582,10 @@  	On Win32, limit text returned from WM_GETTEXT to the length specified in wParam.  	<a href="https://sourceforge.net/p/scintilla/bugs/2110/">Bug #2110</a>.  	</li> + 	<li> +	On GTK, reset IME when mouse is clicked. +	<a href="https://sourceforge.net/p/scintilla/bugs/2111/">Bug #2111</a>. +	</li>      </ul>      <h3>         <a href="https://www.scintilla.org/scite417.zip">Release 4.1.7</a> diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 3b1972880..424b4171d 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -1727,9 +1727,16 @@ gint ScintillaGTK::PressThis(GdkEventButton *event) {  		if (event->type != GDK_BUTTON_PRESS)  			return FALSE; +		if (im_context) { +			PreEditString pes(im_context); +			if (strlen(pes.str) > 0) +				gtk_im_context_reset(im_context); +		} +  		if (evbtn) {  			gdk_event_free(evbtn);  		} +  		evbtn = gdk_event_copy(reinterpret_cast<GdkEvent *>(event));  		buttonMouse = event->button;  		const Point pt = PointOfEvent(event); | 
