File qt4-466791-force-focus-out-input-context.patch of Package libqt4

Index: qt-x11-opensource-src-4.4.3/src/gui/kernel/qwidget.cpp
===================================================================
--- qt-x11-opensource-src-4.4.3.orig/src/gui/kernel/qwidget.cpp
+++ qt-x11-opensource-src-4.4.3/src/gui/kernel/qwidget.cpp
@@ -1280,6 +1280,21 @@ QWidget::~QWidget()
     Q_D(QWidget);
     d->data.in_destructor = true;
 
+#ifndef QT_NO_IM
+    //Q_Q(QWidget);
+    QInputContext *qic = this->inputContext();
+    if (qic) {
+		QWidget * w = qic->focusWidget();
+		while (w){
+        	if(w == this) {
+            	qic->setFocusWidget(NULL);
+				break;
+			}
+			w = qobject_cast<QWidget *>(w->parent());
+		}
+    }
+#endif // QT_NO_IM
+
 #if defined (QT_CHECK_STATE)
     if (paintingActive())
         qWarning("QWidget: %s (%s) deleted while being painted", className(), name());
openSUSE Build Service is sponsored by