[meego-commits] 15242: Changes to Trunk/meegotouch-inputmethodframework

Peter Zhu no_reply at build.meego.com
Fri Mar 25 11:18:12 UTC 2011


Hi,
I have made the following changes to meegotouch-inputmethodframework in project Trunk. Please review and accept ASAP.

Thank You,
Peter Zhu

[This message was auto-generated]

---

Request #15242:

  submit:   Trunk:Testing/meegotouch-inputmethodframework(r2) -> Trunk/meegotouch-inputmethodframework


Message:
    Move to Trunk

State:   new          2011-03-25T04:18:05 peter
Comment: None



changes files:
--------------
--- meegotouch-inputmethodframework.changes
+++ meegotouch-inputmethodframework.changes
@@ -0,0 +1,4 @@
+* Thu Mar 24 2011 Andy Ross <andy.ross at windriver.com> - 0.20.0
+- Patch in "keyboardActive" signal to support tablet launcher
+- Forward-port fix for BMC#13375 (orientation change for Qt apps)
+

new:
----
  Cache-orientation-in-MInputContext.patch
  keyboardActive-signal.patch

spec files:
-----------
--- meegotouch-inputmethodframework.spec
+++ meegotouch-inputmethodframework.spec
@@ -1,6 +1,6 @@
 # 
 # Do NOT Edit the Auto-generated Part!
-# Generated by: spectacle version 0.22
+# Generated by: spectacle version 0.22git
 # 
 # >> macros
 # << macros
@@ -16,6 +16,8 @@
 Source1:    meego-im-uiserver.desktop
 Source2:    meego-im-uiserver.sh
 Source100:  meegotouch-inputmethodframework.yaml
+Patch0:     keyboardActive-signal.patch
+Patch1:     Cache-orientation-in-MInputContext.patch
 Requires(pre): GConf2
 Requires(preun): GConf2
 Requires(post): /sbin/ldconfig
@@ -70,6 +72,10 @@
 %prep
 %setup -q -n %{name}-%{version}
 
+# keyboardActive-signal.patch
+%patch0 -p1
+# Cache-orientation-in-MInputContext.patch
+%patch1 -p1
 # >> setup
 # keep .pc file properly up-to-date for dependency resolution
 %__sed '/^Version:/c\Version: %{version}' -i %{_builddir}/%{name}-%{version}/src/MeegoImFramework.pc

other changes:
--------------

++++++ Cache-orientation-in-MInputContext.patch (new)
--- Cache-orientation-in-MInputContext.patch
+++ Cache-orientation-in-MInputContext.patch
+From de762ffaf1754c4059cb78a13a0e390f73796176 Mon Sep 17 00:00:00 2001
+From: Andy Ross <andy.ross at windriver.com>
+Date: Thu, 24 Mar 2011 15:33:52 -0700
+Subject: [PATCH] Cache orientation in MInputContext
+
+Currently storage of application orientation is done in
+MInputMethodState, but that obviously won't work when the application
+is not an MApplication.
+
+Signed-off-by: Andy Ross <andy.ross at windriver.com>
+---
+ input-context/minputcontext.cpp |    8 +++++---
+ input-context/minputcontext.h   |    3 +++
+ 2 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/input-context/minputcontext.cpp b/input-context/minputcontext.cpp
+index 7940149..d8fec8e 100644
+--- a/input-context/minputcontext.cpp
++++ b/input-context/minputcontext.cpp
+@@ -92,6 +92,9 @@ MInputContext::MInputContext(QObject *parent)
+       imServer(0),
+       correctionEnabled(false),
+       styleContainer(0),
++#ifdef HAVE_MEEGOTOUCH
++      currOrientation(M::Angle0),
++#endif
+       connectedObject(0),
+       pasteAvailable(false),
+       copyAvailable(false),
+@@ -351,9 +354,7 @@ void MInputContext::setFocusWidget(QWidget *focused)
+ 
+ #ifdef HAVE_MEEGOTOUCH
+             // Notify whatever application's orientation is currently.
+-            M::OrientationAngle angle
+-                = MInputMethodState::instance()->activeWindowOrientationAngle();
+-            notifyOrientationChanged(angle);
++            notifyOrientationChanged(currOrientation);
+ #endif
+         }
+ 
+@@ -892,6 +893,7 @@ void MInputContext::notifyOrientationAboutToChange(M::OrientationAngle orientati
+ void MInputContext::notifyOrientationChanged(M::OrientationAngle orientation)
+ {
+     // can get called from signal so cannot be sure we are really currently active
++    currOrientation = orientation;
+     if (active) {
+         imServer->appOrientationChanged(static_cast<int>(orientation));
+     }
+diff --git a/input-context/minputcontext.h b/input-context/minputcontext.h
+index 2deb8db..1208963 100644
+--- a/input-context/minputcontext.h
++++ b/input-context/minputcontext.h
+@@ -269,6 +269,9 @@ private:
+ 
+     MPreeditStyleContainer *styleContainer;
+     QString preedit;
++#ifdef HAVE_MEEGOTOUCH
++    M::OrientationAngle currOrientation;
++#endif
+ 
+     QPointer<QObject> connectedObject;
+     bool pasteAvailable;
+-- 
+1.7.1
+

++++++ keyboardActive-signal.patch (new)
--- keyboardActive-signal.patch
+++ keyboardActive-signal.patch
+Patches in an emitted signal from MInputContext whenever an IPC is
+done to the meego-im-uiserver.  The tablet meego-qml-launcher client
+uses this information to inform its decision as to when to dismiss the
+keyboard.
+
+diff --git a/input-context/minputcontext.cpp b/input-context/minputcontext.cpp
+index 7940149..257b411 100644
+--- a/input-context/minputcontext.cpp
++++ b/input-context/minputcontext.cpp
+@@ -185,6 +185,11 @@ void MInputContext::connectToDBus()
+     connect(imServer, SIGNAL(dbusDisconnected()), this, SLOT(onDBusDisconnection()));
+ }
+ 
++// Hack: do this here to avoid touching all the lines of code in what
++// it a tiny patch.  Note it's position-critical: can't have usage of
++// "imServer" *above* this line modified.
++#define imServer server()
++
+ bool MInputContext::event(QEvent *event)
+ {
+ #ifdef HAVE_MEEGOTOUCH
+diff --git a/input-context/minputcontext.h b/input-context/minputcontext.h
+index 2deb8db..8fe5d4d 100644
+--- a/input-context/minputcontext.h
++++ b/input-context/minputcontext.h
+@@ -179,6 +179,9 @@ public:
+      */
+     QString selection(bool &valid) const;
+ 
++signals:
++    void keyboardActive();
++
+ private slots:
+     //! hides input method
+     void hideOnFocusOut();
+@@ -236,6 +239,8 @@ private:
+         InputPanelHidden         // panel hidden
+     };
+ 
++    
++
+     void connectToDBus();
+ 
+     void notifyCopyPasteState();
+@@ -249,6 +254,11 @@ private:
+     //! returns state for currently focused widget, key is attribute name.
+     QMap<QString, QVariant> getStateInformation() const;
+ 
++    // Hack: emits a signal anywhere imServer is used, the tablet
++    // client uses this for trackign "activity" as a hint for whether
++    // the user is interacting with keyboard-enabled widgets or not.
++    DBusIMServerProxy *server() { emit keyboardActive(); return imServer; }
++
+     //! registers existing attribute extensions to input method server and updates their state
+     void registerExistingAttributeExtensions();
+ 

++++++ meegotouch-inputmethodframework.yaml
--- meegotouch-inputmethodframework.yaml
+++ meegotouch-inputmethodframework.yaml
@@ -7,6 +7,9 @@
 URL: http://meego.gitorious.org/meegotouch/meegotouch-inputmethodframework
 Sources:
     - "%{name}-%{version}.tar.bz2"
+Patches:
+    - keyboardActive-signal.patch
+    - Cache-orientation-in-MInputContext.patch
 Description: |
     MeeGo UI Input Method Framework
 PkgBR:




More information about the MeeGo-commits mailing list