Kaynağa Gözat

Active window flag transferred on RequestSoftwareInputPanel event

The widgets on a ctkPopupWidget could not get the keyboard focus
because the window of the popup widget was not active. Since only
one window can be active at a time, the 'active' flag should always
be transfered to the window that requests the keyboard input.

Fixes #409
Miklos Espak 11 yıl önce
ebeveyn
işleme
a08bba9930
1 değiştirilmiş dosya ile 4 ekleme ve 0 silme
  1. 4 0
      Libs/Widgets/ctkPopupWidget.cpp

+ 4 - 0
Libs/Widgets/ctkPopupWidget.cpp

@@ -138,6 +138,10 @@ bool ctkPopupWidgetPrivate::eventFilter(QObject* obj, QEvent* event)
     {
     QTimer::singleShot(0, this, SLOT(updateVisibility()));
     }
+  else if (event->type() == QEvent::RequestSoftwareInputPanel)
+    {
+    qApp->setActiveWindow(widget->window());
+    }
   return false;
 }