From 43f1d8c741f37b7fa3021bd480b5370b2b22cb53 Mon Sep 17 00:00:00 2001 From: kergoth Date: Wed, 16 Apr 2003 22:46:26 +0000 Subject: Attempt to workaround oliver's reported suspend issue. Check for a qws server at runtime rather than init time, and set the keyboard filter in initButtons rather than init. --- diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 8f954b1..0e1c0dd 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp @@ -278,6 +278,8 @@ void ODevice::initButtons ( ) if ( d-> m_buttons ) return; + d-> m_qwsserver = qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false; + // Simulation uses iPAQ 3660 device buttons qDebug ( "init Buttons" ); @@ -762,8 +764,6 @@ void iPAQ::init ( ) m_power_timer = 0; - if ( d-> m_qwsserver ) - QWSServer::setKeyboardFilter ( this ); } void iPAQ::initButtons ( ) @@ -771,6 +771,11 @@ void iPAQ::initButtons ( ) if ( d-> m_buttons ) return; + d-> m_qwsserver = qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false; + + if ( d-> m_qwsserver ) + QWSServer::setKeyboardFilter ( this ); + d-> m_buttons = new QValueList ; for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { @@ -1149,6 +1154,8 @@ void Zaurus::initButtons ( ) if ( d-> m_buttons ) return; + d-> m_qwsserver = qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false; + d-> m_buttons = new QValueList ; for ( uint i = 0; i < ( sizeof( z_buttons ) / sizeof( z_button )); i++ ) { -- cgit v0.9.0.2