-rw-r--r-- | libopie/odevice.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 8f954b1..0e1c0dd 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp | |||
@@ -277,8 +277,10 @@ void ODevice::initButtons ( ) | |||
277 | { | 277 | { |
278 | if ( d-> m_buttons ) | 278 | if ( d-> m_buttons ) |
279 | return; | 279 | return; |
280 | 280 | ||
281 | d-> m_qwsserver = qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false; | ||
282 | |||
281 | // Simulation uses iPAQ 3660 device buttons | 283 | // Simulation uses iPAQ 3660 device buttons |
282 | 284 | ||
283 | qDebug ( "init Buttons" ); | 285 | qDebug ( "init Buttons" ); |
284 | d-> m_buttons = new QValueList <ODeviceButton>; | 286 | d-> m_buttons = new QValueList <ODeviceButton>; |
@@ -761,17 +763,20 @@ void iPAQ::init ( ) | |||
761 | m_leds [0] = m_leds [1] = Led_Off; | 763 | m_leds [0] = m_leds [1] = Led_Off; |
762 | 764 | ||
763 | m_power_timer = 0; | 765 | m_power_timer = 0; |
764 | 766 | ||
765 | if ( d-> m_qwsserver ) | ||
766 | QWSServer::setKeyboardFilter ( this ); | ||
767 | } | 767 | } |
768 | 768 | ||
769 | void iPAQ::initButtons ( ) | 769 | void iPAQ::initButtons ( ) |
770 | { | 770 | { |
771 | if ( d-> m_buttons ) | 771 | if ( d-> m_buttons ) |
772 | return; | 772 | return; |
773 | 773 | ||
774 | d-> m_qwsserver = qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false; | ||
775 | |||
776 | if ( d-> m_qwsserver ) | ||
777 | QWSServer::setKeyboardFilter ( this ); | ||
778 | |||
774 | d-> m_buttons = new QValueList <ODeviceButton>; | 779 | d-> m_buttons = new QValueList <ODeviceButton>; |
775 | 780 | ||
776 | for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { | 781 | for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { |
777 | i_button *ib = ipaq_buttons + i; | 782 | i_button *ib = ipaq_buttons + i; |
@@ -1148,8 +1153,10 @@ void Zaurus::initButtons ( ) | |||
1148 | { | 1153 | { |
1149 | if ( d-> m_buttons ) | 1154 | if ( d-> m_buttons ) |
1150 | return; | 1155 | return; |
1151 | 1156 | ||
1157 | d-> m_qwsserver = qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false; | ||
1158 | |||
1152 | d-> m_buttons = new QValueList <ODeviceButton>; | 1159 | d-> m_buttons = new QValueList <ODeviceButton>; |
1153 | 1160 | ||
1154 | for ( uint i = 0; i < ( sizeof( z_buttons ) / sizeof( z_button )); i++ ) { | 1161 | for ( uint i = 0; i < ( sizeof( z_buttons ) / sizeof( z_button )); i++ ) { |
1155 | z_button *zb = z_buttons + i; | 1162 | z_button *zb = z_buttons + i; |