Re: gtk_im_context_set_cursor_location() in GtkTextView
- From: HideToshi Tajima <hidetoshi tajima eng sun com>
- To: yzhang sharemedia com, hp redhat com
- Cc: gtk-i18n-list gnome org
- Subject: Re: gtk_im_context_set_cursor_location() in GtkTextView
- Date: Wed, 03 Oct 2001 11:05:54 -0700 (PDT)
>There is an open bug in bugzilla on this:
>
> http://bugzilla.gnome.org/show_bug.cgi?id=50626
>
>The patch there from Hidetoshi has the same problem as yours, it
>updates the spot hint at essentially random times.
>
>We need to think through exactly what cases will result in the cursor
>location changing, and update the spot hint in response to those
>cases, rather than simply updating it on every event or the like.
Then, in the gtk_text_view_update_im_spot_location, how about doing:
static gint gcursor_x = 0, gcursor_y = 0;
gint new_cursor_x, new_cursor_y;
gtk_text_view_get_virtual_cursor_pos (text_view, &new_cursor_x, &new_cursor_y);
if (new_cursor_x != gcursor_x || new_cursor_y != gcursor_y)
{
area.x = cursor_x_pos;
area.y = cursor_y_pos;
area.width = area.height = 0;
gtk_im_context_set_cursor_location (text_view->im_context, &area);
}
Or, how about doing this in the gtk_im_context_set_cursot_location()?
Regards,
Toshi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]