Bug 616277
Summary: | hangul text color is not properly set in kwrite | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | fujiwara <tfujiwar> |
Component: | ibus-qt | Assignee: | fujiwara <tfujiwar> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 13 | CC: | i18n-bugs, ktakemur, llim, psatpute, shawn.p.huang, tfujiwar |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | ibus-qt-1.3.0-2.fc13 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | 608966 | Environment: | |
Last Closed: | 2010-08-13 21:15:15 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 608966 |
Description
fujiwara
2010-07-20 01:46:15 UTC
Yesterday I discussed with the maintainer. His point was ibus-pinyin and ibus-anthy also don't show the preedit correctly and the root cause is same but my patch fixes the reported issue only. So I'll have the furthermore investigation. I'll compare the qt/kde with the old ones to know what was the regression. Set Need Info to me. Need much build time... I tried the old qt/kde which showed the preedit text with colors but QApplication::x11ProcessEvent() didn't call IBusInputContext::x11FilterEvent() so the preedit was drawn by the default colors but IBus colors. E.g. IBus active preedit color is purple in ibus-anthy/ibus-pinyin but the old one was black. So actually this bus is not a regression but a feature to use inputmethod colors. I think revering the KDE/QT codes doesn't make sense to resolve this issue. The previous patch fixes ibus-hangul and ibus-rawcode issue, i,e, in case the drawing ranges are same. But ibus-anthy and ibus-pinyin provides the different ranges. underline is all preedit range. purple background color is active lookup table range. The bug is, ibus-anthy doesn't show the purple color. I understood the KDE implementation: kdelibs-4.3.4/kate/view/kateviewinternal.cpp: void KateViewInternal::inputMethodEvent(QInputMethodEvent* e) { int decorationColumn = 0; foreach (const QInputMethodEvent::Attribute &a, e->attributes()) { if (a.type == QInputMethodEvent::Cursor) { } else if (a.type == QInputMethodEvent::TextFormat) { QTextCharFormat f = qvariant_cast<QTextFormat>(a.value).toCharFormat(); if (f.isValid() && decorationColumn <= a.start) { decorationColumn = a.start + a.length; } } } } The decorationColumn checks if the next format doesn't have the duplicated start point a.start. In ibus-anthy, underline is whole the preedit length and lookup table(purple color) is one segment in preedit and the a.start is duplicated and the color formats are ignored. I.e. KDE doesn't support the layered colors in preedit. If we would send the multiple KateViewInternal::inputMethodEvent(), the last update is effective and the colors would be overrided. The solution is that ibus-qt changes the layered colors to segment colors. E.g. first segment is underline, purple background, black foreground. other segments are underline only. So if the ranges are same, I think the formats should be consolidated to one format. Revised the patch: http://github.com/fujiwarat/ibus-qt/commit/7233a42974d959069f7399c85dcc97275fcfd86e typo: (In reply to comment #2) > so the preedit was drawn by the default colors but IBus colors. so the preedit was drawn by the default colors not IBus colors. > So actually this bus is not a regression but a feature to use inputmethod > colors. So actually this bug is not a regression but a feature to use inputmethod colors. Thanks for the review. Revised the patch: http://github.com/fujiwarat/ibus-qt/commit/9145e97544dcf49a02939fbac6c289758ff09218 I'll integrate the patch into rawhide for the test purpose. Integrated the fix in rawhide: http://koji.fedoraproject.org/koji/taskinfo?taskID=2345562 It seems the patch is also upstreamed, thanks. Probably it's good to integrate the fix in f13. Integrated in f13: http://koji.fedoraproject.org/koji/taskinfo?taskID=2346026 ibus-qt-1.3.0-2.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/ibus-qt-1.3.0-2.fc13 ibus-qt-1.3.0-2.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update ibus-qt'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/ibus-qt-1.3.0-2.fc13 This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component. ibus-qt-1.3.0-2.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report. |