Bug 461373 - KDE BUG#167982: Focus switch causes selected text to be deleted in Kate.
Summary: KDE BUG#167982: Focus switch causes selected text to be deleted in Kate.
Keywords:
Status: CLOSED DUPLICATE of bug 464397
Alias: None
Product: Fedora
Classification: Fedora
Component: scim-bridge
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Peng Huang
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-06 22:51 UTC by Alexander Gavrilov
Modified: 2008-10-04 08:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-04 08:41:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Stack trace of the text deletion event. (14.29 KB, text/plain)
2008-09-06 22:51 UTC, Alexander Gavrilov
no flags Details
A stopgap patch to scim-bridge-qt (1.93 KB, patch)
2008-09-06 22:53 UTC, Alexander Gavrilov
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
KDE Software Compilation 167982 0 None None None Never

Description Alexander Gavrilov 2008-09-06 22:51:56 UTC
Created attachment 315960 [details]
Stack trace of the text deletion event.

Description of problem:

On a KDE4.1 system with Qt SCIM bridge installed and configured,
selecting a region of text in Kate or KWrite and then switching
to another application and back causes the text to be deleted.


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

Fedora 9 + all updates + currently pending KDE4.1 update


How reproducible:

On an appropriately configured system, 100% predictable results.


Additional info:

I debugged the problem to produce a stack trace, and made a
patch for scim-bridge-qt that fixes it for me. Note that this
is the first time I ever had to fix anything in Qt/SCIM, so
my analysis might be wrong:


The bug is caused by preedit string update events that were sent by
scim-bridge during the focus change sequence. Problems:

1) QInputContext::setFocusWidget() is called before focus_out()
2) Preedit string hide event is sent even if it wasn't displayed.

As a result, when the focus is switched in, the _target_ Kate widget
receives a preedit event, and trashes its selection.

Comment 1 Alexander Gavrilov 2008-09-06 22:53:10 UTC
Created attachment 315961 [details]
A stopgap patch to scim-bridge-qt

Comment 2 Peng Huang 2008-09-16 02:05:09 UTC
Fixed in scim-bridge-0_4_15-7. Thanks.

Comment 3 Alexander Gavrilov 2008-10-04 08:41:14 UTC

*** This bug has been marked as a duplicate of bug 464397 ***


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