Is there any reason not making the text entry focused before sending KeyPress event to it?

Yichao Yu yyc1992 at gmail.com
Mon Jul 16 00:12:04 EDT 2012


O, and btw, I have already reported this bug fix 5 weeks ago (with no
reply) in ticket #15159.

Yichao Yu

On Mon, Jul 16, 2012 at 12:06 AM, Yichao Yu <yyc1992 at gmail.com> wrote:
> Hi All,
>
> When pressing a key in pidgin's chat window, the key will be sent to
> the input entry even if it is not focused. However, this event is not
> sent to input method (which is REALLY annoy for ppl like me that uses
> input method!!!)
>
> Looking at the source code, in pidgin/gtkconv.c (arround line 2271)
>
>         if (event->type == GDK_KEY_RELEASE)
>                 gtk_widget_grab_focus(gtkconv->entry);
>
>         gtk_widget_event(gtkconv->entry, (GdkEvent *)event);
> which means the entry will not be focused when a keypress event is
> sent and this causes the imcontext not sending the event to input
> method. Since the event will anyway be sent to the entry, I cannot see
> the point why it should not be focused. Is there really any specific
> reason for doing that?
>
> (btw, afaik, removing the if line fixes the input method issue perfectly)
>
> Yichao Yu




More information about the Devel mailing list