aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2011-07-11 15:01:02 +1000
committernyamatongwe <unknown>2011-07-11 15:01:02 +1000
commit2b14060f4c12bee171cf197c9ea0ae4094bdb1f4 (patch)
tree7aea36365d31aa9fda83df85a50453142c8335fe
parent471c95a0a624c635750fb8e9cca97e002eaa3ccd (diff)
downloadscintilla-mirror-2b14060f4c12bee171cf197c9ea0ae4094bdb1f4.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.cxx8
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);