After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 315374 - Text view's key-press-event signal is delivered without terminating input method, resulting in truncated input
Text view's key-press-event signal is delivered without terminating input met...
Status: RESOLVED DUPLICATE of bug 62948
Product: gtk+
Classification: Platform
Component: Input Methods
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Hidetoshi Tajima
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-09-06 16:01 UTC by Hrvoje Niksic
Modified: 2005-09-06 19:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Python script to reproduce the problem (706 bytes, text/plain)
2005-09-06 16:03 UTC, Hrvoje Niksic
Details

Description Hrvoje Niksic 2005-09-06 16:01:14 UTC
DESCRIPTION: Many applications with text input use the "key-press-event" signal
to catch keys with special meaning, for example to have "return" sending an
instant message to the server.  Input methods misbehave in this case by not
terminating the input sequence before delivering the signal.  As a result, the
content of the text buffer is missing the last character of the input, which
reappears in the buffer after the signal is processed.  This is a serious
problem with using GTK input methods in gaim.

HOW TO REPRODUCE: Run the attached Python script.  It creates a label and a text
box.  You can type text into the text box; when you press enter, the text is
shown in the label.  To reproduce the bug, switch to "Vietnamese (VIQR)" input
method and type "bla" followed by enter.

RESULT: "bl" shown in the label and an underlined "a" remains in the text buffer.

EXPECTED RESULT: "bla" shown in the label, text buffer empty.

Applications could presumably work around this by using connect_after, but this
would cause characters like "enter" to insert unwanted characters into the
buffer.  The application uses regular connect for good reason, and it works
well, except when input methods are used.

This problem is not specific to VIQR, it happens with any input method when
return is pressed while the most recently typed character remains underlined. 
It can also be reproduced with the IPA input method with the same "bla" example.
 This happens in GTK 2.6.8; I do not have GTK 2.8 to test whether this has been
fixed.
Comment 1 Hrvoje Niksic 2005-09-06 16:03:59 UTC
Created attachment 51878 [details]
Python script to reproduce the problem
Comment 2 Owen Taylor 2005-09-06 19:31:14 UTC
If you connect to "activate" then you probably wont have the problem,
for the particular case of "Return". Hard problem in general.



*** This bug has been marked as a duplicate of 62948 ***
Comment 3 Hrvoje Niksic 2005-09-06 19:34:16 UTC
I don't think it's possible for gaim, which is configurable to accept either
return or ctrl-return as ways of sending the message.  Can a program configure
what triggers the "activate" signal?