summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/main.cpp7
-rw-r--r--core/opie-login/main.cpp7
-rw-r--r--libopie2/opiecore/device/odevice.cpp5
-rw-r--r--libopie2/opiecore/device/odevice.h2
-rw-r--r--libopie2/opiecore/device/odevice_genuineintel.cpp6
-rw-r--r--libopie2/opiecore/device/odevice_genuineintel.h2
-rw-r--r--libopie2/opiecore/device/odevice_ipaq.cpp21
-rw-r--r--libopie2/opiecore/device/odevice_ipaq.h2
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp44
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.h2
10 files changed, 3 insertions, 95 deletions
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp
index 734d072..5bbed59 100644
--- a/core/launcher/main.cpp
+++ b/core/launcher/main.cpp
@@ -158,9 +158,6 @@ int initApplication( int argc, char ** argv )
return 0;
}
-#ifndef Q_OS_MACX
- ODevice::inst()->setSoftSuspend( true );
-#endif
{
QCopEnvelope e("QPE/System", "setBacklight(int)" );
e << -3; // Forced on
@@ -195,10 +192,6 @@ int initApplication( int argc, char ** argv )
odebug << "removing server object..." << oendl;
delete s;
-#ifndef Q_OS_MACX
- ODevice::inst()->setSoftSuspend( false );
-#endif
-
odebug << "returning from qpe/initapplication..." << oendl;
return rv;
}
diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp
index 0699d0a..2de0180 100644
--- a/core/opie-login/main.cpp
+++ b/core/opie-login/main.cpp
@@ -192,8 +192,7 @@ int main ( int argc, char **argv )
if ( autolog && !userExited ) {
QWSServer::setDesktopBackground( QImage() );
- ODevice::inst ( )-> setDisplayStatus ( true );
- ODevice::inst ( )-> setSoftSuspend ( false );
+ ODevice::inst()->setDisplayStatus( true );
LoginApplication *app = new LoginApplication ( argc, argv, ppid );
LoginApplication::setLoginAs ( autolog );
@@ -335,8 +334,6 @@ int login_main ( int argc, char **argv, pid_t ppid )
app-> setFont ( QFont ( "Helvetica", 10 ));
app-> setStyle ( new QPEStyle ( ));
- ODevice::inst ( )-> setSoftSuspend ( true );
-
if ( QWSServer::mouseHandler() &&
QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) {
if ( !QFile::exists ( "/etc/pointercal" )) {
@@ -361,8 +358,6 @@ int login_main ( int argc, char **argv, pid_t ppid )
int rc = app-> exec ( );
- ODevice::inst ( )-> setSoftSuspend ( false );
-
if ( app-> loginAs ( )) {
if ( app-> changeIdentity ( )) {
app-> login ( );
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp
index a824392..3d69614 100644
--- a/libopie2/opiecore/device/odevice.cpp
+++ b/libopie2/opiecore/device/odevice.cpp
@@ -254,11 +254,6 @@ ODevice::~ODevice()
delete d;
}
-bool ODevice::setSoftSuspend ( bool /*soft*/ )
-{
- return false;
-}
-
//#include <linux/apm_bios.h>
#define APM_IOC_SUSPEND OD_IO( 'A', 2 )
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h
index bbc32fa..96a41fc 100644
--- a/libopie2/opiecore/device/odevice.h
+++ b/libopie2/opiecore/device/odevice.h
@@ -255,8 +255,6 @@ public:
virtual ODirection direction() const;
// system
-
- virtual bool setSoftSuspend ( bool on );
virtual bool suspend();
virtual bool setDisplayStatus ( bool on );
diff --git a/libopie2/opiecore/device/odevice_genuineintel.cpp b/libopie2/opiecore/device/odevice_genuineintel.cpp
index 61ba052..1584249 100644
--- a/libopie2/opiecore/device/odevice_genuineintel.cpp
+++ b/libopie2/opiecore/device/odevice_genuineintel.cpp
@@ -160,12 +160,6 @@ void GenuineIntel::playAlarmSound()
}
-bool GenuineIntel::setSoftSuspend ( bool )
-{
- return false;
-}
-
-
bool GenuineIntel::setDisplayBrightness ( int )
{
return false;
diff --git a/libopie2/opiecore/device/odevice_genuineintel.h b/libopie2/opiecore/device/odevice_genuineintel.h
index 52c5fc6..69316af 100644
--- a/libopie2/opiecore/device/odevice_genuineintel.h
+++ b/libopie2/opiecore/device/odevice_genuineintel.h
@@ -47,8 +47,6 @@ class GenuineIntel : public ODevice, public QWSServer::KeyboardFilter
virtual void initButtons();
public:
- virtual bool setSoftSuspend( bool soft );
-
virtual bool setDisplayBrightness( int b );
virtual int displayBrightnessResolution() const;
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp
index 9e01a0c..2ce38a9 100644
--- a/libopie2/opiecore/device/odevice_ipaq.cpp
+++ b/libopie2/opiecore/device/odevice_ipaq.cpp
@@ -336,27 +336,6 @@ void iPAQ::playAlarmSound()
#endif
}
-
-bool iPAQ::setSoftSuspend ( bool soft )
-{
- bool res = false;
- int fd;
-
- if (( fd = ::open ( "/proc/sys/ts/suspend_button_mode", O_WRONLY )) >= 0 ) {
- if ( ::write ( fd, soft ? "1" : "0", 1 ) == 1 )
- res = true;
- else
- ::perror ( "write to /proc/sys/ts/suspend_button_mode" );
-
- ::close ( fd );
- }
- else
- ::perror ( "/proc/sys/ts/suspend_button_mode" );
-
- return res;
-}
-
-
bool iPAQ::setDisplayBrightness ( int bright )
{
bool res = false;
diff --git a/libopie2/opiecore/device/odevice_ipaq.h b/libopie2/opiecore/device/odevice_ipaq.h
index cc0b8ac..b1dac74 100644
--- a/libopie2/opiecore/device/odevice_ipaq.h
+++ b/libopie2/opiecore/device/odevice_ipaq.h
@@ -47,8 +47,6 @@ class iPAQ : public ODevice, public QWSServer::KeyboardFilter
virtual void initButtons();
public:
- virtual bool setSoftSuspend( bool soft );
-
virtual bool setDisplayBrightness( int b );
virtual int displayBrightnessResolution() const;
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp
index b22ee70..cbc7a24 100644
--- a/libopie2/opiecore/device/odevice_zaurus.cpp
+++ b/libopie2/opiecore/device/odevice_zaurus.cpp
@@ -380,43 +380,6 @@ bool Zaurus::setLedState( OLed which, OLedState st )
return false;
}
-bool Zaurus::setSoftSuspend ( bool soft )
-{
- if (!m_embedix) {
- /* non-Embedix kernels dont have kernel autosuspend */
- return ODevice::setSoftSuspend( soft );
- }
-
- bool res = false;
- int fd;
-
- if ((( fd = ::open ( "/dev/apm_bios", O_RDWR )) >= 0 ) ||
- (( fd = ::open ( "/dev/misc/apm_bios",O_RDWR )) >= 0 )) {
-
- int sources = ::ioctl( fd, APM_IOCGEVTSRC, 0 ); // get current event sources
-
- if ( sources >= 0 ) {
- if ( soft )
- sources &= ~APM_EVT_POWER_BUTTON;
- else
- sources |= APM_EVT_POWER_BUTTON;
-
- if ( ::ioctl( fd, APM_IOCSEVTSRC, sources ) >= 0 ) // set new event sources
- res = true;
- else
- perror ( "APM_IOCGEVTSRC" );
- }
- else
- perror ( "APM_IOCGEVTSRC" );
-
- ::close( fd );
- }
- else
- perror( "/dev/apm_bios or /dev/misc/apm_bios" );
-
- return res;
-}
-
int Zaurus::displayBrightnessResolution() const
{
int res = 1;
@@ -540,9 +503,7 @@ bool Zaurus::suspend()
Transformation Zaurus::rotation() const
{
Transformation rot;
- int handle = 0;
- int retval = 0;
-
+
switch ( d->m_model ) {
case Model_Zaurus_SLC3000: // fallthrough
case Model_Zaurus_SLC7x0:
@@ -566,8 +527,7 @@ Transformation Zaurus::rotation() const
ODirection Zaurus::direction() const
{
ODirection dir;
- int handle = 0;
- int retval = 0;
+
switch ( d->m_model ) {
case Model_Zaurus_SLC3000: // fallthrough
case Model_Zaurus_SLC7x0:
diff --git a/libopie2/opiecore/device/odevice_zaurus.h b/libopie2/opiecore/device/odevice_zaurus.h
index c763798..04e73c4 100644
--- a/libopie2/opiecore/device/odevice_zaurus.h
+++ b/libopie2/opiecore/device/odevice_zaurus.h
@@ -94,8 +94,6 @@ class Zaurus : public ODevice
virtual void initButtons();
public:
- virtual bool setSoftSuspend( bool soft );
-
virtual bool setDisplayBrightness( int b );
virtual bool setDisplayStatus( bool on );
virtual int displayBrightnessResolution() const;