summaryrefslogtreecommitdiffstats
path: root/opensuse/core/qt3/fix-key-release-event-with-imm.diff
diff options
context:
space:
mode:
Diffstat (limited to 'opensuse/core/qt3/fix-key-release-event-with-imm.diff')
-rw-r--r--opensuse/core/qt3/fix-key-release-event-with-imm.diff55
1 files changed, 55 insertions, 0 deletions
diff --git a/opensuse/core/qt3/fix-key-release-event-with-imm.diff b/opensuse/core/qt3/fix-key-release-event-with-imm.diff
new file mode 100644
index 000000000..3bd1b8da2
--- /dev/null
+++ b/opensuse/core/qt3/fix-key-release-event-with-imm.diff
@@ -0,0 +1,55 @@
+--- src/kernel/qapplication_x11.cpp
++++ src/kernel/qapplication_x11.cpp
+@@ -3294,11 +3294,7 @@
+ // filtering opportunity first to ensure all input methods work
+ // properly regardless of application design.
+
+-#ifndef QT_NO_IM_EXTENSIONS
+ if( keywidget && keywidget->isEnabled() && keywidget->isInputMethodEnabled() ) {
+-#else
+- if( keywidget && keywidget->isEnabled() ) {
+-#endif
+ if( ( event->type==XKeyPress || event->type==XKeyRelease ) &&
+ sm_blockUserInput ) // block user interaction during session management
+ return TRUE;
+@@ -5220,11 +5216,12 @@
+ } else {
+ key = (int)(long)keyDict->find( keycode );
+ if ( key )
+- if( !willRepeat ) // Take out key of dictionary only if this call.
++ if( !willRepeat && statefulTranslation ) // Take out key of dictionary only if this call.
+ keyDict->take( keycode );
+ long s = (long)textDict->find( keycode );
+ if ( s ) {
+- textDict->take( keycode );
++ if( statefulTranslation )
++ textDict->take( keycode );
+ ascii = (char)(s-256);
+ }
+ }
+--- src/kernel/qwidget_x11.cpp
++++ src/kernel/qwidget_x11.cpp
+@@ -2699,11 +2699,10 @@
+ {
+ QInputContext *qic = 0;
+
+-#if !defined(QT_NO_IM_EXTENSIONS)
+ if ( isInputMethodEnabled() ) {
++#if !defined(QT_NO_IM_EXTENSIONS)
+ qic = icHolderWidget()->ic;
+ #else
+- {
+ // icHolderWidget is always topLevelWidget
+ QTLWExtra *topdata = icHolderWidget()->topData();
+ qic = (QInputContext *)topdata->xic;
+@@ -2754,10 +2753,8 @@
+ */
+ void QWidget::createInputContext()
+ {
+-#if !defined(QT_NO_IM_EXTENSIONS)
+ if( !isInputMethodEnabled() || QApplication::closingDown() )
+ return;
+-#endif
+
+ QWidget *icWidget = icHolderWidget();
+ #ifndef QT_NO_IM