[oe-commits] Paul Eggleton : libopie2/qte: fix bad cursor key rotation on some devices

git version control git at git.openembedded.org
Wed May 27 23:24:29 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: ac97bd863e5c69efc12044237b4b0ca411890097
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=ac97bd863e5c69efc12044237b4b0ca411890097

Author: Paul Eggleton <bluelightning at bluelightning.org>
Date:   Thu May 28 00:17:01 2009 +0100

libopie2/qte: fix bad cursor key rotation on some devices
 * Should fix bad cursor key rotation with respect to the screen on
   some devices and hopefully won't affect devices that were OK.
 * All responsibility for rotating the cursor keys now lies with
   ODevice (libopie2). Any further fixes need to be applied there.
 * Refer to OE bug #3678 for more information.

---

 recipes/libopie/libopie2/rotate_fix.patch         |   87 +++++++++++++++++++++
 recipes/libopie/libopie2_1.2.4.bb                 |    5 +-
 recipes/qte/qte-2.3.10/disable-dup-rotation.patch |    2 +-
 recipes/qte/qte-mt_2.3.10.bb                      |    2 +-
 recipes/qte/qte_2.3.10.bb                         |    2 +-
 5 files changed, 93 insertions(+), 5 deletions(-)

diff --git a/recipes/libopie/libopie2/rotate_fix.patch b/recipes/libopie/libopie2/rotate_fix.patch
new file mode 100644
index 0000000..c6a5984
--- /dev/null
+++ b/recipes/libopie/libopie2/rotate_fix.patch
@@ -0,0 +1,87 @@
+--- libopie2/opiecore/device/odevice_ipaq.cpp	24 May 2009 20:09:49 -0000	1.40
++++ libopie2/opiecore/device/odevice_ipaq.cpp	27 May 2009 21:16:24 -0000
+@@ -35,6 +35,7 @@
+ #include <qfile.h>
+ #include <qtextstream.h>
+ #include <qwindowsystem_qws.h>
++#include <qgfx_qws.h>
+ 
+ /* OPIE */
+ #include <qpe/config.h>
+@@ -335,11 +336,11 @@
+             int quarters;
+             switch (d->m_rotation) {
+                 case Rot0:   quarters = 0/*0deg*/; break;
+-                case Rot90:  quarters = 1/*90deg*/; break;
++                case Rot90:  quarters = 3/*90deg*/; break;
+                 case Rot180: quarters = 2/*180deg*/; break;
+-                case Rot270: quarters = 3/*270deg*/; break;
++                case Rot270: quarters = 1/*270deg*/; break;
+             }
+-            newkeycode = Key_Left + ( keycode - Key_Left + quarters ) % 4;
++            newkeycode = Key_Left + ( keycode - Key_Left + quarters + qt_screen->transformOrientation() ) % 4;
+             break;
+         }
+ 
+--- libopie2/opiecore/device/odevice_zaurus.cpp	24 May 2009 20:09:49 -0000	1.57
++++ libopie2/opiecore/device/odevice_zaurus.cpp	27 May 2009 21:16:24 -0000
+@@ -807,16 +807,8 @@
+         case Key_Up   :
+         case Key_Down :
+         {
+-            if (d->m_model == Model_Zaurus_SLC3000) {
+-                // This ensures that the cursor keys work correctly and that the
+-                // side wheel works as expected when the screen is flipped over
+-                if (rotation() == Rot270)
+-                    newkeycode = Key_Left + ( keycode - Key_Left + 1 ) % 4;
+-            }
+-            else {
+-                if (rotation()==Rot90)
+-                    newkeycode = Key_Left + ( keycode - Key_Left + 3 ) % 4;
+-            }
++            if (rotation()==Rot90)
++                newkeycode = Key_Left + ( keycode - Key_Left + 3 ) % 4;
+             break;
+             
+         }
+--- libopie2/opiecore/device/odevice_palm.cpp	2009-05-27 22:28:37.000000000 +0100
++++ libopie2/opiecore/device/odevice_palm.cpp	2009-05-27 22:28:09.000000000 +0100
+@@ -295,25 +295,21 @@
+ {
+     int newkeycode = keycode;
+ 
+-    if (qt_screen->transformOrientation() != Rot0){
+-
+-        switch ( keycode ) {
+-	    case Key_Left :
+-            case Key_Right:
+-            case Key_Up   :
+-            case Key_Down :
+-		    newkeycode = Key_Left + ( keycode - Key_Left + 4 ) % 4;
+-	    default:
+-		break;
+-        }
++    switch ( keycode ) {
++        case Key_Left :
++        case Key_Right:
++        case Key_Up   :
++        case Key_Down :
++            newkeycode = Key_Left + ( keycode - Key_Left + qt_screen->transformOrientation() ) % 4;
++        default:
++            break;
++    }
+ 
+-        if (newkeycode!=keycode) {
+-            if ( newkeycode != Key_unknown ) {
+-                QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat );
+-            }
+-            return true;
++    if (newkeycode!=keycode) {
++        if ( newkeycode != Key_unknown ) {
++            QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat );
+         }
+-
++        return true;
+     }
+ 
+     return false;
diff --git a/recipes/libopie/libopie2_1.2.4.bb b/recipes/libopie/libopie2_1.2.4.bb
index 0634ad7..d66cf3f 100644
--- a/recipes/libopie/libopie2_1.2.4.bb
+++ b/recipes/libopie/libopie2_1.2.4.bb
@@ -1,10 +1,11 @@
 require ${PN}.inc
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "${HANDHELDS_CVS};tag=${TAG};module=opie/libopie2 \
            file://include.pro \
            file://libopie2-tosa.patch;patch=1 \
-           file://c7x0_w100_disable.patch;patch=1"
+           file://c7x0_w100_disable.patch;patch=1 \
+           file://rotate_fix.patch;patch=1"
 
 SRC_URI_append_poodle = " file://poodle-2.6-hotkeys.patch;patch=1"
diff --git a/recipes/qte/qte-2.3.10/disable-dup-rotation.patch b/recipes/qte/qte-2.3.10/disable-dup-rotation.patch
index 8a2a022..6874ba5 100644
--- a/recipes/qte/qte-2.3.10/disable-dup-rotation.patch
+++ b/recipes/qte/qte-2.3.10/disable-dup-rotation.patch
@@ -4,7 +4,7 @@
      case Qt::Key_Down:
          unicode = 0xffff;
          mod_key = false;
-+#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX)
++#if 0
          if (qt_screen->isTransformed())
              qtKeyCode = static_cast<Qt::Key>( xform_dirkey(static_cast<int>( qtKeyCode ) ) );
 +#endif
diff --git a/recipes/qte/qte-mt_2.3.10.bb b/recipes/qte/qte-mt_2.3.10.bb
index 32afeda..71873dc 100644
--- a/recipes/qte/qte-mt_2.3.10.bb
+++ b/recipes/qte/qte-mt_2.3.10.bb
@@ -1,5 +1,5 @@
 require qte-common_${PV}.inc
-PR = "r27"
+PR = "r28"
 
 EXTRA_OECONF += "-thread"
 
diff --git a/recipes/qte/qte_2.3.10.bb b/recipes/qte/qte_2.3.10.bb
index 68825b6..1183bc2 100644
--- a/recipes/qte/qte_2.3.10.bb
+++ b/recipes/qte/qte_2.3.10.bb
@@ -1,3 +1,3 @@
 require qte-common_${PV}.inc
-PR = "r52"
+PR = "r53"
 





More information about the Openembedded-commits mailing list