Bug 608966 - uncommitted text color is not properly set in kwrite
Summary: uncommitted text color is not properly set in kwrite
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ibus-qt
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: fujiwara
QA Contact: QE Internationalization Bugs
: 613520 (view as bug list)
Depends On: 616277
TreeView+ depends on / blocked
Reported: 2010-06-29 04:03 UTC by Kenichi Takemura
Modified: 2014-08-04 22:02 UTC (History)
5 users (show)

Clone Of:
: 616277 (view as bug list)
Last Closed: 2010-07-29 06:54:29 UTC

Attachments (Terms of Use)
screenshot when I type "rlagrlagrla" with ibus-hangul on kwrite (5.47 KB, image/png)
2010-06-29 07:46 UTC, Daiki Ueno
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
KDE Software Compilation 241085 None None None Never

Description Kenichi Takemura 2010-06-29 04:03:52 UTC
Description of problem:
A Hangul character entered by using iBus with Korean Input method in kwrite application is displayed in white colour text before pressing space or enter or next character.
If space or enter key is pressed or next character is typed, it appears in black colour.

Version-Release number of selected component (if applicable):


How reproducible:

Every time

Steps to Reproduce:
1.Install kdebase by yum
2.Launch kwrite
3.Turn iBus on in kwrite
4.Type a hangul
Actual results:

A hangul character is in white font colour which is hard to see.

Expected results:

A hangul character is in default font colour(black)

Additional info:

Entering English or Japanese in kwrite works fine for this problem.

Comment 2 RHEL Product and Program Management 2010-06-29 04:22:53 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for

Comment 3 Daiki Ueno 2010-06-29 07:44:49 UTC
I can reproduce it even on Fedora 13, if ibus-qt is installed (screenshot attached).  ibus-hangul uses white/black (fg/bg) for preedit text and requests these settings to applications via ibus-qt.  However, the KTextEdit control (which kwrite uses) overrides the bg setting.

The solution would be to make KTextEdit (kdelibs) not overwrite existing text attributes, but it might not be easy.  Another solution is to choose reasonable default colors for ibus-hangul preedit as in other IME.

Comment 4 Daiki Ueno 2010-06-29 07:46:54 UTC
Created attachment 427599 [details]
screenshot when I type "rlagrlagrla" with ibus-hangul on kwrite

Comment 5 Pravin Satpute 2010-07-12 06:42:23 UTC
same problem is occurring in ibus-rawcode as well
see https://bugzilla.redhat.com/show_bug.cgi?id=613520

i think we should fix this from ibus-qt side, so will no need to change all ime-engine's code

Comment 6 fujiwara 2010-07-13 05:57:58 UTC
rf. https://bugs.kde.org/show_bug.cgi?id=241085

Comment 8 fujiwara 2010-07-16 09:10:25 UTC
I could reproduce this problem.
I almost understood the root cause. Will update the evaluation later.

Comment 9 Pravin Satpute 2010-07-16 10:30:35 UTC
I just saw on fedora 13 with kdebase 4.4.5-1, this problem is not coming. 
Tested for ibus-rawcode

Comment 12 fujiwara 2010-07-20 01:31:12 UTC
(In reply to comment #9)
> I just saw on fedora 13 with kdebase 4.4.5-1, this problem is not coming. 
> Tested for ibus-rawcode    

I can reproduce the same bug in f13 kdebase 4.4.5-1 and f14.

ibus-hangul's engine sets foreground is white and background is black.
The problem is, the foreground color only is set in the actual preedit GUI but the background color is lost and this causes both the foreground and the background color are white and users cannot read the preedit text.


QList<QTextLayout::FormatRange> KateRenderer::decorationsForLine( const KateTextLine::Ptr& textLine, int line, bool selectionsOnly, KateRenderRange* completionHighlight, bool completionSelected ) const
        fr.format = *a;

It seems kde kate rendering get one format only.
But ibus-qt sends multiple formats with QAttribute.

The solution is ibus-qt has one format only and it can have both foreground and background colors.

The suggested patch:

Comment 14 fujiwara 2010-07-23 03:33:15 UTC
Integrated the same fix in fedora rawhide:

Comment 15 Pravin Satpute 2010-07-23 05:20:37 UTC
i have tested  
F13 Build
http://koji.fedoraproject.org/koji/taskinfo?taskID=2346026  on RHEL6

It is resolving problem of ibus-rawcode on RHEL6
thanks fujuwara

Comment 17 Jens Petersen 2010-07-27 06:17:50 UTC
*** Bug 613520 has been marked as a duplicate of this bug. ***

Comment 19 fujiwara 2010-07-28 01:31:11 UTC
Integrated the fix.

Comment 22 Kenichi Takemura 2010-07-29 06:54:18 UTC
Verified in kwrite with all supported input method


Note You need to log in before you can comment on or make changes to this bug.