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 | 475d2bb335bd849eb87feebac9ad34768f534f51 (patch) | |
tree | 5a11f5e82de295e0169697a41566810cea191122 | |
parent | c50b896fbd358a6607663daf36804aa01eaada69 (diff) | |
download | scintilla-mirror-475d2bb335bd849eb87feebac9ad34768f534f51.tar.gz |
Backport: Bug [#2111]. Reset IME when mouse is clicked on GTK.
Backport of changeset 7599:512ec9ab2e7c.
-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 61542d923..2f7a4e106 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -532,6 +532,8 @@ <td>Jad Altahan</td> <td>Andrea Ricchi</td> <td>Wil van Antwerpen</td> + </tr><tr> + <td>Hodong Kim</td> </tr> </table> <p> @@ -569,6 +571,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://sourceforge.net/projects/scintilla/files/scintilla/3.10.6/scintilla3106.zip/download">Release 3.10.6</a> diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index eab650179..714f75e4d 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -1726,9 +1726,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); |