Bug 13910 - Unwanted IM reset on focus-out of Qt4 immodule
Summary: Unwanted IM reset on focus-out of Qt4 immodule
Status: RESOLVED FIXED
Alias: None
Product: UIM
Classification: Unclassified
Component: bridge: Qt (show other bugs)
Version: unspecified
Hardware: Other All
: high major
Assignee: uim-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 7730
  Show dependency treegraph
 
Reported: 2008-01-03 08:05 UTC by YamaKen
Modified: 2010-06-05 16:18 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
patch (773 bytes, patch)
2010-03-25 07:35 UTC, Muneyuki Noguchi
Details | Splinter Review
patch to keep preedit text (4.27 KB, patch)
2010-05-23 04:09 UTC, Muneyuki Noguchi
Details | Splinter Review
patch to keep preedit text (v2) (4.61 KB, patch)
2010-05-29 04:03 UTC, Muneyuki Noguchi
Details | Splinter Review
patch to keep preedit text (v3) (9.12 KB, patch)
2010-06-04 19:02 UTC, Muneyuki Noguchi
Details | Splinter Review

Description YamaKen 2008-01-03 08:05:52 UTC
On Qt4 immodule, unwanted IM reset is caused in response to widget-level focus-out. This is significantly painful for Japanese IM users.

Resolution of this problem has been postponed to uim 1.6.0. So Qt4 immodule will be marked as 'experimental' in uim 1.5.0.
Comment 1 Muneyuki Noguchi 2010-03-25 07:35:35 UTC
Created attachment 34432 [details] [review]
patch

Maybe we can't fix this bug unless doing what the Qt4 documentation says you must not or you should not.
Comment 2 Etsushi Kato 2010-03-25 18:37:41 UTC
(In reply to comment #1)
> Created an attachment (id=34432) [details]
> patch
> 
> Maybe we can't fix this bug unless doing what the Qt4 documentation says you
> must not or you should not.

Thanks for the consideration.  Perhaps you misunderstand the original issue.  In uim, we have reset handler (and also focus-in/out, displace and place handlers) in input method itself.  It serves as language dependent requirement (or demand) when the focus is changed during the text editing, i.e. keeping preedit text, committing composing text, clearing preedit, and so on.

We should anyhow need to solve the problem of broken reset by focus change in Qt4 (and also GTK+)...  This is the original intension of the bug, I think.
Comment 3 Muneyuki Noguchi 2010-05-23 04:03:26 UTC
(In reply to comment #2)
> It serves as language dependent requirement
> (or demand) when the focus is changed during the text editing, i.e. keeping
> preedit text, committing composing text, clearing preedit, and so on.

Is it related to QUimInputContext::isPreeditPreservationEnabled()?
Comment 4 Muneyuki Noguchi 2010-05-23 04:09:42 UTC
Created attachment 35802 [details] [review]
patch to keep preedit text
Comment 5 Muneyuki Noguchi 2010-05-29 04:03:43 UTC
Created attachment 35929 [details] [review]
patch to keep preedit text (v2)

IMO, this bug is Qt4-specific one because "Qt" is in the title of this bug and this bug is referred to in "Qt4 bridge (experimental)" section in NEWS.

http://uim.googlecode.com/svn/trunk/NEWS
> - Qt4 bridge (experimental)
>    * Basically working but still having some known bugs (#13910, #13911)

If so, we only must make Qt4 immodule behave like GTK+ immodule.

Anyway, it would be nice if the original reporter explains this bug in greater detail.
Comment 6 Etsushi Kato 2010-05-31 23:42:08 UTC
(In reply to comment #5)

I think you understand the problem quite well now.

Just a glance of the patch, key concept is to keep preedit using on-to-on uim contexts for corresponding widgets shared within one qt's input context, right?

It seems the approach is quite hack, so please enclose the code with #ifdef to keep the code understandable.  This would also make maintenance of the code simple when Qt4 itself fix the problem.

In addition, you need to fix QUimInputContext::language() to represent currently using input method language.
Comment 7 Muneyuki Noguchi 2010-06-04 19:02:27 UTC
Created attachment 36065 [details] [review]
patch to keep preedit text (v3)

I've introduced a new macro and modified QUimInputContext::language().

How about this patch to close this bug?
Comment 8 Etsushi Kato 2010-06-05 14:41:34 UTC
Seems fine to me.  Please commit the patch and close this bug :)
Thanks.
Comment 9 Muneyuki Noguchi 2010-06-05 16:18:35 UTC
Fixed in trunk (r6418).


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.