Bug 1108707

Summary: After clearing the drawing area using ESC, the next commit is inserted as garbage
Product: [Fedora] Fedora Reporter: Mike FABIAN <mfabian>
Component: ibus-handwriteAssignee: Peng Wu <pwu>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: i18n-bugs, mfabian, petersen, pwu, shawn.p.huang
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ibus-handwrite-2.1.4-11.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-26 01:52:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
ibus-handwrite-mojibake.ogv
none
The draft patch. none

Description Mike FABIAN 2014-06-12 12:57:23 UTC
Created attachment 908109 [details]
ibus-handwrite-mojibake.ogv

Version: ibus-handwrite-2.1.4-9.fc20

How to reproduce:

- ibus restart
- select ibus-handwrite in the panel
- draw a horizontal line
- click on the 一 character in the candidates displayed below

  → ー is committed (OK so far).

- Type ESC to clear the drawing area
- draw a horizontal line again
- click on the 一 character in the candidates displayed below again

  → two replacement characters U+FFFD are committed.
  
- click on the 一 character in the candidates displayed below again

  → ー is committed (OK again).

- Type ESC to clear the drawing area
- draw a horizontal line again
- click on the 一 character in the candidates displayed below again

  → two replacement characters U+FFFD are committed.
  
- click on the 一 character in the candidates displayed below again

  → ー is committed (OK again).

...

So always after clearing the drawing area with ESC, the first
commit which follows is inserted as garbage.

See attached video.

Comment 1 Peng Wu 2014-06-16 07:56:42 UTC
Today I checked with the ibus-handwrite code.

It seems caused by the following problem:
1. the ibus-handwrite window is non-focusable;
2. the key code is sent directly to the current application;
3. ibus-handwrite will send others characters.

So "Esc" key is sent to gnome-terminal, then follows the Japanese character.

If I make the ibus-handwrite window focusable, the key event won't be sent to any other applications.

Comment 2 Peng Wu 2014-06-16 08:18:30 UTC
Sorry, please ignore the previous comment.

Comment 3 Peng Wu 2014-06-16 08:20:38 UTC
Created attachment 909061 [details]
The draft patch.

Hi Mike,
  Could you help to check whether the patch works?
Thanks,
  Peng Wu

Comment 4 Mike FABIAN 2014-06-16 15:48:18 UTC
Yes, this patch works.

It does not apply against current git master though, master has
changed a bit.

It applies against this commit:

    https://github.com/microcai/ibus-handwrite/commit/0cc144c38654a32fc8d5dc05a9d91206fa9f4058
    
    commit 0cc144c38654a32fc8d5dc05a9d91206fa9f4058
    Author: microcai <microcai>
    Date:   Fri Mar 25 13:30:47 2011 +0800
    
        not a update

which seems to be the commit for the 2.1.4 release, i.e.
the commit used for the ibus-handwrite-2.1.4-9.fc20 package.

Comment 5 Peng Wu 2014-06-17 03:23:38 UTC
The git repo code has some problems now.

Currently we maintain the ibus-handwrite 2.1.4 version.

Comment 6 Fedora Update System 2014-06-17 07:17:29 UTC
ibus-handwrite-2.1.4-11.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/ibus-handwrite-2.1.4-11.fc19

Comment 7 Fedora Update System 2014-06-17 07:17:39 UTC
ibus-handwrite-2.1.4-11.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/ibus-handwrite-2.1.4-11.fc20

Comment 8 Fedora Update System 2014-06-17 23:34:34 UTC
Package ibus-handwrite-2.1.4-11.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ibus-handwrite-2.1.4-11.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-7455/ibus-handwrite-2.1.4-11.fc19
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2014-06-26 01:52:15 UTC
ibus-handwrite-2.1.4-11.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2014-06-26 01:59:43 UTC
ibus-handwrite-2.1.4-11.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.