summaryrefslogtreecommitdiff
path: root/core/opie-login/main.cpp
Unidiff
Diffstat (limited to 'core/opie-login/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/opie-login/main.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp
index 718009a..df9451d 100644
--- a/core/opie-login/main.cpp
+++ b/core/opie-login/main.cpp
@@ -18,12 +18,14 @@
18#include <qwindowsystem_qws.h> 18#include <qwindowsystem_qws.h>
19#include <qfile.h> 19#include <qfile.h>
20 20
21#include "loginwindowimpl.h" 21#include "loginwindowimpl.h"
22#include "calibrate.h" 22#include "calibrate.h"
23 23
24using namespace Opie;
25
24int login_main ( int argc, char **argv ); 26int login_main ( int argc, char **argv );
25void sigusr1 ( int sig ); 27void sigusr1 ( int sig );
26void exit_closelog ( ); 28void exit_closelog ( );
27 29
28 30
29 31
@@ -87,20 +89,20 @@ public:
87 m_lcd_status = true; 89 m_lcd_status = true;
88 90
89 m_backlight_bright = -1; 91 m_backlight_bright = -1;
90 m_backlight_forcedoff = false; 92 m_backlight_forcedoff = false;
91 93
92 // Make sure the LCD is in fact on, (if opie was killed while the LCD is off it would still be off) 94 // Make sure the LCD is in fact on, (if opie was killed while the LCD is off it would still be off)
93 ODevice::inst ( ) -> setDisplayStatus ( true ); 95 ODevice::inst ( )-> setDisplayStatus ( true );
94 } 96 }
95 void restore() 97 void restore()
96 { 98 {
97 if ( !m_lcd_status ) // We must have turned it off 99 if ( !m_lcd_status ) // We must have turned it off
98 ODevice::inst ( ) -> setDisplayStatus ( true ); 100 ODevice::inst ( ) -> setDisplayStatus ( true );
99 101
100 setBacklight ( -1 ); 102 setBacklight ( -3 );
101 } 103 }
102 bool save( int level ) 104 bool save( int level )
103 { 105 {
104 switch ( level ) { 106 switch ( level ) {
105 case 0: 107 case 0:
106 if ( backlight() > 1 ) 108 if ( backlight() > 1 )
@@ -186,31 +188,26 @@ int login_main ( int argc, char **argv )
186 188
187 app. setFont ( QFont ( "Helvetica", 10 )); 189 app. setFont ( QFont ( "Helvetica", 10 ));
188 app. setStyle ( new QPEStyle ( )); 190 app. setStyle ( new QPEStyle ( ));
189 191
190 ODevice::inst ( )-> setSoftSuspend ( true ); 192 ODevice::inst ( )-> setSoftSuspend ( true );
191 193
192 {
193 QCopEnvelope e("QPE/System", "setBacklight(int)" );
194 e << -3; // Forced on
195 }
196
197#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) 194#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
198 if ( !QFile::exists ( "/etc/pointercal" )) { 195 if ( !QFile::exists ( "/etc/pointercal" )) {
199 // Make sure calibration widget starts on top. 196 // Make sure calibration widget starts on top.
200 Calibrate *cal = new Calibrate; 197 Calibrate *cal = new Calibrate;
201 cal-> exec ( ); 198 cal-> exec ( );
202 delete cal; 199 delete cal;
203 } 200 }
204#endif 201#endif
205 202
206
207 LoginScreenSaver *saver = new LoginScreenSaver; 203 LoginScreenSaver *saver = new LoginScreenSaver;
208 204
209 saver-> setIntervals ( ); 205 saver-> setIntervals ( );
210 QWSServer::setScreenSaver ( saver ); 206 QWSServer::setScreenSaver ( saver );
207 saver-> restore ( );
211 208
212 209
213 LoginWindowImpl *lw = new LoginWindowImpl ( ); 210 LoginWindowImpl *lw = new LoginWindowImpl ( );
214 app. setMainWidget ( lw ); 211 app. setMainWidget ( lw );
215 lw-> setGeometry ( 0, 0, app. desktop ( )-> width ( ), app. desktop ( )-> height ( )); 212 lw-> setGeometry ( 0, 0, app. desktop ( )-> width ( ), app. desktop ( )-> height ( ));
216 lw-> show ( ); 213 lw-> show ( );