summaryrefslogtreecommitdiff
authorsandman <sandman>2002-08-04 02:52:49 (UTC)
committer sandman <sandman>2002-08-04 02:52:49 (UTC)
commit97cdd27f6f7696e4e6f1239c90ecc2b94c087239 (patch) (unidiff)
tree68057ed5a0a9866addc62650218ec6856863173f
parenta8c65999503fa9ff34db3069c53bbc1685b521ec (diff)
downloadopie-97cdd27f6f7696e4e6f1239c90ecc2b94c087239.zip
opie-97cdd27f6f7696e4e6f1239c90ecc2b94c087239.tar.gz
opie-97cdd27f6f7696e4e6f1239c90ecc2b94c087239.tar.bz2
Another bug fix for suspend/resume on iPAQs (blinking screen).. this bug
is very hard to trigger and has probably never shown up
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp
index 1e741d5..3ee5e26 100644
--- a/core/launcher/main.cpp
+++ b/core/launcher/main.cpp
@@ -208,64 +208,66 @@ public:
208 { 208 {
209 bool kill = false; 209 bool kill = false;
210 210
211 // Rotate cursor keys 180° 211 // Rotate cursor keys 180°
212 switch ( m_model ) { 212 switch ( m_model ) {
213 case OMODEL_iPAQ_H31xx: 213 case OMODEL_iPAQ_H31xx:
214 case OMODEL_iPAQ_H38xx: { 214 case OMODEL_iPAQ_H38xx: {
215 int newkeycode = keycode; 215 int newkeycode = keycode;
216 216
217 switch ( keycode ) { 217 switch ( keycode ) {
218 case Key_Left : newkeycode = Key_Right; break; 218 case Key_Left : newkeycode = Key_Right; break;
219 case Key_Right: newkeycode = Key_Left; break; 219 case Key_Right: newkeycode = Key_Left; break;
220 case Key_Up : newkeycode = Key_Down; break; 220 case Key_Up : newkeycode = Key_Down; break;
221 case Key_Down : newkeycode = Key_Up; break; 221 case Key_Down : newkeycode = Key_Up; break;
222 } 222 }
223 if ( newkeycode != keycode ) { 223 if ( newkeycode != keycode ) {
224 QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat ); 224 QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat );
225 kill = true; 225 kill = true;
226 } 226 }
227 break; 227 break;
228 } 228 }
229 default: break; 229 default: break;
230 } 230 }
231 231
232 // map Power Button short/long press to F34/F35 232 // map Power Button short/long press to F34/F35
233 switch ( m_model ) { 233 switch ( m_model ) {
234 case OMODEL_iPAQ_H31xx: 234 case OMODEL_iPAQ_H31xx:
235 case OMODEL_iPAQ_H36xx: 235 case OMODEL_iPAQ_H36xx:
236 case OMODEL_iPAQ_H37xx: 236 case OMODEL_iPAQ_H37xx:
237 case OMODEL_iPAQ_H38xx: { 237 case OMODEL_iPAQ_H38xx: {
238 if ( keycode == Key_SysReq ) { 238 if ( keycode == Key_SysReq ) {
239 if ( isPress ) { 239 if ( isPress ) {
240 if ( m_power_timer )
241 killTimer ( m_power_timer );
240 m_power_timer = startTimer ( 500 ); 242 m_power_timer = startTimer ( 500 );
241 } 243 }
242 else if ( m_power_timer ) { 244 else if ( m_power_timer ) {
243 killTimer ( m_power_timer ); 245 killTimer ( m_power_timer );
244 m_power_timer = 0; 246 m_power_timer = 0;
245 QWSServer::sendKeyEvent ( -1, Key_F34, 0, true, false ); 247 QWSServer::sendKeyEvent ( -1, Key_F34, 0, true, false );
246 QWSServer::sendKeyEvent ( -1, Key_F34, 0, false, false ); 248 QWSServer::sendKeyEvent ( -1, Key_F34, 0, false, false );
247 } 249 }
248 kill = true; 250 kill = true;
249 } 251 }
250 break; 252 break;
251 } 253 }
252 default: break; 254 default: break;
253 } 255 }
254 return kill; 256 return kill;
255 } 257 }
256 258
257 virtual void timerEvent ( QTimerEvent * ) 259 virtual void timerEvent ( QTimerEvent * )
258 { 260 {
259 killTimer ( m_power_timer ); 261 killTimer ( m_power_timer );
260 m_power_timer = 0; 262 m_power_timer = 0;
261 QWSServer::sendKeyEvent ( -1, Key_F35, 0, true, false ); 263 QWSServer::sendKeyEvent ( -1, Key_F35, 0, true, false );
262 QWSServer::sendKeyEvent ( -1, Key_F35, 0, false, false ); 264 QWSServer::sendKeyEvent ( -1, Key_F35, 0, false, false );
263 } 265 }
264 266
265private: 267private:
266 OModel m_model; 268 OModel m_model;
267 int m_power_timer; 269 int m_power_timer;
268}; 270};
269 271
270 272
271 273