[Uim] Focus and cursor position shift handlings (bug #7729)

Etsushi Kato ek.kato at gmail.com
Tue Nov 21 21:07:48 EET 2006


On 11/20/06, Etsushi Kato <ek.kato at gmail.com> wrote:
>           guint id;
>           GQuark quark;
>           if (g_signal_parse_name ("move_cursor",
>                                    G_TYPE_FROM_INSTANCE (focus_widget),
>                                    &id, &quark, TRUE))
>             g_signal_emit(focus_widget, id, quark,
>                           GTK_MOVEMENT_LOGICAL_POSITIONS, 0, FALSE);

Oops, I noticed this doesn't work since some widgets have
"move_cursor" signal with different number of arguments.

I've revised the patch using a new "is-test-widget" attribute for
GtkWidget.  It still uses "move_cursor" signal to call
fix_im_context_weakly upon button press, and I didn't touch im reset
code needed for the displace/place timing.

> However, again, I don't think emitting "move_cursor" is suitable in
> this case.  If we use "move_cursor" for GtkEntry/GtkTextView to notify
> button_press in toolbuttons, it will break your model about
> distinguishing focus-in/out and place/displace.  "move_cusor" handlers
> in GtkEntry/GtkTextView are off course used for real cursor move by
> keyboard, and this should use place/displace model.  Or you intended
> that call fix_im_context_weakly() only if count of "move_cursor" is 0,
> and call displace_im_context() and place_im_context() when count != 0?
>  This seems to be a pretty dirty hack for me.

How about "interrupt-im-context" signal,
gtk_entry_interrupt_im_context(), and
gtk_text_view_interrupt_im_context()?

> And as noted above, to revise im reset code in
> gtkentry.c/gtktextview.c, it requires preedit displace/place handlers
> in GtkIMContext.  Do you intended that this also shouldn't be touched
> at the moment?

Cheers,
-- 
Etsushi Kato
ek.kato at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gtk+-textwidget.diff
Type: application/octet-stream
Size: 7687 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/uim/attachments/20061122/42072f06/attachment.obj 


More information about the uim mailing list