Bug 461373 - KDE BUG#167982: Focus switch causes selected text to be deleted in Kate.
KDE BUG#167982: Focus switch causes selected text to be deleted in Kate.
Status: CLOSED DUPLICATE of bug 464397
Product: Fedora
Classification: Fedora
Component: scim-bridge (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Peng Huang
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-09-06 18:51 EDT by Alexander Gavrilov
Modified: 2008-10-04 04:41 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-10-04 04:41:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

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

  None (edit)
Description Alexander Gavrilov 2008-09-06 18:51:56 EDT
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 18:53:10 EDT
Created attachment 315961 [details]
A stopgap patch to scim-bridge-qt
Comment 2 Peng Huang 2008-09-15 22:05:09 EDT
Fixed in scim-bridge-0_4_15-7. Thanks.
Comment 3 Alexander Gavrilov 2008-10-04 04:41:14 EDT

*** 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.