Преглед изворни кода

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 година
родитељ
комит
a08bba9930
1 измењених фајлова са 4 додато и 0 уклоњено
  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;
 }