diff options
author | nyamatongwe <devnull@localhost> | 2011-06-22 17:52:57 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2011-06-22 17:52:57 +1000 |
commit | c0b8fab943f214548dcfe49df1b84ed7c57f0c73 (patch) | |
tree | d30a182e33e036bed4a6c062e126e90576fc226b | |
parent | 25926dca1478c7453feef3498c6e4b6a843c710e (diff) | |
download | scintilla-mirror-c0b8fab943f214548dcfe49df1b84ed7c57f0c73.tar.gz |
Made IME work on GTK+ 2.x with Cairo. Bug #3311423.
-rw-r--r-- | gtk/ScintillaGTK.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index e5bb3fb5a..c03841b22 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -2289,7 +2289,12 @@ gboolean ScintillaGTK::ExposePreeditThis(GtkWidget *widget, GdkEventExpose *ose) PangoLayout *layout = gtk_widget_create_pango_layout(PWidget(wText), str); pango_layout_set_attributes(layout, attrs); -#ifndef USE_CAIRO +#ifdef USE_CAIRO + cairo_t *context = gdk_cairo_create(reinterpret_cast<GdkDrawable *>(WindowFromWidget(widget))); + cairo_move_to(context, 0, 0); + pango_cairo_show_layout(context, layout); + cairo_destroy(context); +#else GdkGC *gc = gdk_gc_new(widget->window); GdkColor color[2] = { {0, 0x0000, 0x0000, 0x0000}, {0, 0xffff, 0xffff, 0xffff} |