diff options
author | nyamatongwe <devnull@localhost> | 2011-07-11 15:01:02 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2011-07-11 15:01:02 +1000 |
commit | 15c3e1203d85d128a0432a35a5674763e1cac7b7 (patch) | |
tree | d49a1f5a9f57146519e1ca7cd12cc4001dc2b7b3 | |
parent | 41d7b34979e2f66125f645583351df7889a07d1f (diff) | |
download | scintilla-mirror-15c3e1203d85d128a0432a35a5674763e1cac7b7.tar.gz |
Make Unicode input through Ctrl+Shift+U work by passing key release
events to gtk_im_context_filter_keypress.
-rw-r--r-- | gtk/ScintillaGTK.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 0683b413d..73d15c25f 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -2245,8 +2245,12 @@ gboolean ScintillaGTK::KeyPress(GtkWidget *widget, GdkEventKey *event) { return sciThis->KeyThis(event); } -gboolean ScintillaGTK::KeyRelease(GtkWidget *, GdkEventKey * /*event*/) { +gboolean ScintillaGTK::KeyRelease(GtkWidget *widget, GdkEventKey *event) { //Platform::DebugPrintf("SC-keyrel: %d %x %3s\n",event->keyval, event->state, event->string); + ScintillaGTK *sciThis = ScintillaFromWidget(widget); + if (gtk_im_context_filter_keypress(sciThis->im_context, event)) { + return TRUE; + } return FALSE; } @@ -2261,7 +2265,7 @@ gboolean ScintillaGTK::DrawPreeditThis(GtkWidget *widget, cairo_t *cr) { gtk_im_context_get_preedit_string(im_context, &str, &attrs, &cursor_pos); PangoLayout *layout = gtk_widget_create_pango_layout(PWidget(wText), str); pango_layout_set_attributes(layout, attrs); - + cairo_move_to(cr, 0, 0); pango_cairo_show_layout(cr, layout); |