Bug 586192

Summary: Text selection (highlight) in QT app (eg: kate) will be deleted unexpectedly when moving focus out and in (back) to that QT application. (with SCIM installed)
Product: [openSUSE] openSUSE 11.2 Reporter: song song <sonoud>
Component: KDE4 WorkspaceAssignee: E-mail List <kde-maintainers>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Critical    
Priority: P5 - None CC: ctrippe
Version: Final   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 11.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description song song 2010-03-08 08:15:24 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4) Gecko/20091016 SUSE/3.5.4-1.1.2 Firefox/3.5.4

scim is the default input method installed when you choose other language pack. (eg: Asia language, Japanese, Korean, Chinese etc...).
With SCIM installed. Fresh installation of opensuse 11.2 (11.1, 11.0). 

If you use a QT application, eg: kate for programming, highlight/select some text, and then move the focus to other window and then move the focus back to the QT application (eg: kate), the text selection will be deleted unexpectedly. 

I think this is a critical problem exists for a long time, because it causes me to lose codes, data etc.... it should happen to all the people who install other language pack. (as long as the people install the language pack. doesn't need to change the locale. my locale is still set to default one. en_US.UTF-8)

I found the solution how to fix this problem. 

The solution 1:
----------------
Temporary solution, the default value of QT_IM_MODULE is scim-bridge. 
We need to change this as follows:
  export QT_IM_MODULE=scim
After the above export in a terminal, all QT application launched under that terminal will have no problem. 

The solution 2:
----------------
create and setup ~/.xim properly.
basically, cp ~/.xim.template ~/.xim
and then uncomment the following:
    export XMODIFIERS="@im=SCIM"
    export GTK_IM_MODULE=scim
    export QT_IM_SWITCHER=imsw-multi
    export QT_IM_MODULE=scim
    scim -d

restart the OS will solve the problem forever. 

=====================================================

I think this bug is critical is because scim is installed by default automatically and started automatically. Normal user will not be able to know they have to setup .xim manually to change the value of QT_IM_MODULE to solve this problem. 
This problem causes QT application losing input data, especailly when programming using kate. 

Thanks. 

Reproducible: Always

Steps to Reproduce:
Described clearly in "Details" section. 
Actual Results:  
Text selection in QT application is deleted when focus moving out and in. 

Expected Results:  
Text selection in QT application should not be deleted when focus moving out and in.
Comment 1 song song 2010-03-08 08:21:33 UTC
I should point out again that this problem happens in fresh install of opensuse 11.2, 11.1, 11.0.
Comment 3 Christian Trippe 2011-05-21 17:23:26 UTC
should be fixed meanwhile.

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