summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_simpad.cpp
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice_simpad.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_simpad.cpp30
1 files changed, 21 insertions, 9 deletions
diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp
index 4ae3c4f..ebf0cbb 100644
--- a/libopie2/opiecore/device/odevice_simpad.cpp
+++ b/libopie2/opiecore/device/odevice_simpad.cpp
@@ -36,2 +36,3 @@
36#include <qwindowsystem_qws.h> 36#include <qwindowsystem_qws.h>
37#include <qwidgetlist.h>
37 38
@@ -317,3 +318,2 @@ bool SIMpad::suspend() // Must override because SIMpad does NOT have apm
317{ 318{
318 qDebug( "ODevice for SIMpad: suspend()" );
319 if ( !isQWS( ) ) // only qwsserver is allowed to suspend 319 if ( !isQWS( ) ) // only qwsserver is allowed to suspend
@@ -321,8 +321,2 @@ bool SIMpad::suspend() // Must override because SIMpad does NOT have apm
321 321
322 /*
323 * we need to save the screen content
324 * then go to suspend using ODevice::suspend
325 * and finally restore the screen content
326 */
327 (void)::system( "cat /dev/fb/0 > /tmp/.buffer" );
328 bool res = ODevice::suspend(); 322 bool res = ODevice::suspend();
@@ -330,6 +324,7 @@ bool SIMpad::suspend() // Must override because SIMpad does NOT have apm
330 /* 324 /*
331 * restore 325 * restore the screen content if we really
326 * supended the device
332 */ 327 */
333 if ( res ) 328 if ( res )
334 ::system( "cat /tmp/.buffer > /dev/fb/0" ); 329 updateAllWidgets();
335 330
@@ -371 +366,18 @@ int SIMpad::displayBrightnessResolution() const
371 366
367
368/*
369 * The MQ200 DRAM content is lost during suspend
370 * so we will just repaint every widget on resume
371 */
372void SIMpad::updateAllWidgets() {
373 QWidgetList *list = QApplication::allWidgets();
374 QWidgetListIt it( *list );
375 QWidget *wid;
376
377 while ((wid=it.current()) != 0 ) {
378 wid->update();
379 ++it;
380 }
381
382 delete list;
383}