Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37562098
en ru br
Репозитории ALT

Группа :: Система/Библиотеки
Пакет: maliit-framework

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: maliit-framework-focusworkaround.diff
Скачать


--- a/maliit-plugins-quick/input-method/minputmethodquick.cpp	2013-02-13 14:24:09.000000000 +0400
+++ b/maliit-plugins-quick/input-method/minputmethodquick.cpp	2013-09-11 10:38:08.244000000 +0400
@@ -53,6 +53,7 @@
 #include <QGraphicsScene>
 #include <QGraphicsObject>
 #include <QDir>
+#include <QTimer>
 #include <memory>
 
 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
@@ -364,6 +365,7 @@ void MInputMethodQuick::show()
       setActive(true);
 #endif
       d->syncInputMask();
+      QTimer::singleShot(100, this, SLOT(centerMouseOnKeyboard()));
     }
 }
 
@@ -384,6 +386,15 @@ void MInputMethodQuick::hide()
     d->handleInputMethodAreaUpdate(inputMethodHost(), r);
 }
 
+void MInputMethodQuick::centerMouseOnKeyboard()
+{
+    Q_D(MInputMethodQuick);
+    if(d->sipIsInhibited) {
+      return;
+    }
+    QCursor::setPos(d->inputMethodArea.center().x(), d->inputMethodArea.center().y());
+}
+
 void MInputMethodQuick::handleAppOrientationChanged(int angle)
 {
     Q_D(MInputMethodQuick);
--- a/maliit-plugins-quick/input-method/minputmethodquick.h~	2013-02-13 14:24:09.000000000 +0400
+++ b/maliit-plugins-quick/input-method/minputmethodquick.h	2013-09-11 10:38:39.224000000 +0400
@@ -166,6 +166,7 @@ private:
     MInputMethodQuickPrivate *const d_ptr;
 
 private Q_SLOTS:
+    void centerMouseOnKeyboard();
     //! Propagates change to QML.
     void onSentActionKeyAttributesChanged(const QString &keyId, const MKeyOverride::KeyOverrideAttributes changedAttributes);
 };
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin