46ee35c
--- qt-x11-free-3.3.6/src/kernel/qapplication_x11.cpp.orig	2006-06-20 15:45:44.000000000 +0200
46ee35c
+++ qt-x11-free-3.3.6/src/kernel/qapplication_x11.cpp	2006-06-20 15:51:13.000000000 +0200
46ee35c
@@ -3294,11 +3294,7 @@
46ee35c
     // filtering opportunity first to ensure all input methods work
46ee35c
     // properly regardless of application design.
46ee35c
 
46ee35c
-#ifndef QT_NO_IM_EXTENSIONS
46ee35c
     if( keywidget && keywidget->isEnabled() && keywidget->isInputMethodEnabled() ) {
46ee35c
-#else
46ee35c
-    if( keywidget && keywidget->isEnabled() ) {
46ee35c
-#endif
46ee35c
 	if( ( event->type==XKeyPress || event->type==XKeyRelease ) &&
46ee35c
 	    sm_blockUserInput ) // block user interaction during session management
46ee35c
 	    return TRUE;
46ee35c
@@ -5220,11 +5216,12 @@
46ee35c
     } else {
46ee35c
 	key = (int)(long)keyDict->find( keycode );
46ee35c
 	if ( key )
46ee35c
-	    if( !willRepeat ) // Take out key of dictionary only if this call.
46ee35c
+	    if( !willRepeat && statefulTranslation ) // Take out key of dictionary only if this call.
46ee35c
 		keyDict->take( keycode );
46ee35c
 	long s = (long)textDict->find( keycode );
46ee35c
 	if ( s ) {
46ee35c
-	    textDict->take( keycode );
46ee35c
+	    if( statefulTranslation )
46ee35c
+	        textDict->take( keycode );
46ee35c
 	    ascii = (char)(s-256);
46ee35c
 	}
46ee35c
     }
46ee35c
--- qt-x11-free-3.3.6/src/kernel/qwidget_x11.cpp.orig	2006-06-20 15:46:49.000000000 +0200
46ee35c
+++ qt-x11-free-3.3.6/src/kernel/qwidget_x11.cpp	2006-06-20 15:48:14.000000000 +0200
46ee35c
@@ -2699,11 +2699,10 @@
46ee35c
 {
46ee35c
     QInputContext *qic = 0;
46ee35c
 
46ee35c
-#if !defined(QT_NO_IM_EXTENSIONS)
46ee35c
     if ( isInputMethodEnabled() ) {
46ee35c
+#if !defined(QT_NO_IM_EXTENSIONS)
46ee35c
 	qic = icHolderWidget()->ic;
46ee35c
 #else
46ee35c
-    {
46ee35c
 	// icHolderWidget is always topLevelWidget
46ee35c
 	QTLWExtra *topdata = icHolderWidget()->topData();
46ee35c
 	qic = (QInputContext *)topdata->xic;
46ee35c
@@ -2754,10 +2753,8 @@
46ee35c
 */
46ee35c
 void QWidget::createInputContext()
46ee35c
 {
46ee35c
-#if !defined(QT_NO_IM_EXTENSIONS)
46ee35c
     if( !isInputMethodEnabled() || QApplication::closingDown() )
46ee35c
 	return;
46ee35c
-#endif
46ee35c
 
46ee35c
     QWidget *icWidget = icHolderWidget();
46ee35c
 #ifndef QT_NO_IM