summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp
index 89b9258..59d4eb0 100644
--- a/libopie2/opiecore/device/odevice_zaurus.cpp
+++ b/libopie2/opiecore/device/odevice_zaurus.cpp
@@ -237,19 +237,19 @@ void Zaurus::initButtons()
237{ 237{
238 if ( d->m_buttons ) 238 if ( d->m_buttons )
239 return; 239 return;
240 240
241 if ( isQWS( ) ) {
242 addPreHandler(this);
243 }
244 241
245 d->m_buttons = new QValueList <ODeviceButton>; 242 d->m_buttons = new QValueList <ODeviceButton>;
246 243
247 struct z_button * pz_buttons; 244 struct z_button * pz_buttons;
248 int buttoncount; 245 int buttoncount;
249 switch ( d->m_model ) { 246 switch ( d->m_model ) {
250 case Model_Zaurus_SLC3000: // fallthrough 247 case Model_Zaurus_SLC3000: // fallthrough
251 case Model_Zaurus_SLC7x0: 248 case Model_Zaurus_SLC7x0:
249 if ( isQWS( ) ) {
250 addPreHandler(this); // hinge-sensor-handler
251 }
252 pz_buttons = z_buttons_c700; 252 pz_buttons = z_buttons_c700;
253 buttoncount = ARRAY_SIZE(z_buttons_c700); 253 buttoncount = ARRAY_SIZE(z_buttons_c700);
254 break; 254 break;
255 default: 255 default:
@@ -602,15 +602,11 @@ OHingeStatus Zaurus::readHingeSensor() const
602 * I hope that is ok - Alwin 602 * I hope that is ok - Alwin
603 */ 603 */
604bool Zaurus::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat ) 604bool Zaurus::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat )
605{ 605{
606 Transformation rot;
607 int newkeycode = keycode; 606 int newkeycode = keycode;
608 607
609
610 if (d->m_model!=Model_Zaurus_SLC3000 && d->m_model!=Model_Zaurus_SLC7x0) return false; 608 if (d->m_model!=Model_Zaurus_SLC3000 && d->m_model!=Model_Zaurus_SLC7x0) return false;
611 rot = rotation();
612 if (rot==Rot0) return false;
613 609
614 /* map cursor keys depending on the hinge status */ 610 /* map cursor keys depending on the hinge status */
615 switch ( keycode ) { 611 switch ( keycode ) {
616 // Rotate cursor keys 612 // Rotate cursor keys
@@ -618,9 +614,9 @@ bool Zaurus::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress,
618 case Key_Right: 614 case Key_Right:
619 case Key_Up : 615 case Key_Up :
620 case Key_Down : 616 case Key_Down :
621 { 617 {
622 if (rot==Rot90) { 618 if (rotation()==Rot90) {
623 newkeycode = Key_Left + ( keycode - Key_Left + 3 ) % 4; 619 newkeycode = Key_Left + ( keycode - Key_Left + 3 ) % 4;
624 } 620 }
625 } 621 }
626 break; 622 break;
@@ -633,4 +629,5 @@ bool Zaurus::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress,
633 return true; 629 return true;
634 } 630 }
635 return false; 631 return false;
636} 632}
633