summaryrefslogtreecommitdiff
path: root/core/launcher/serverapp.cpp
Unidiff
Diffstat (limited to 'core/launcher/serverapp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/serverapp.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/launcher/serverapp.cpp b/core/launcher/serverapp.cpp
index d38dd97..e4e16f2 100644
--- a/core/launcher/serverapp.cpp
+++ b/core/launcher/serverapp.cpp
@@ -46,24 +46,25 @@
46#include <qpainter.h> 46#include <qpainter.h>
47#include <qfile.h> 47#include <qfile.h>
48#include <qpixmapcache.h> 48#include <qpixmapcache.h>
49 49
50#include <stdlib.h> 50#include <stdlib.h>
51#include "screensaver.h" 51#include "screensaver.h"
52 52
53static ServerApplication *serverApp = 0; 53static ServerApplication *serverApp = 0;
54static int loggedin=0; 54static int loggedin=0;
55 55
56using namespace Opie; 56using namespace Opie;
57 57
58using namespace Opie::Core;
58QCopKeyRegister::QCopKeyRegister() 59QCopKeyRegister::QCopKeyRegister()
59 : m_keyCode( 0 ) { 60 : m_keyCode( 0 ) {
60} 61}
61 62
62QCopKeyRegister::QCopKeyRegister( int k, const QCString& c, const QCString& m ) 63QCopKeyRegister::QCopKeyRegister( int k, const QCString& c, const QCString& m )
63 :m_keyCode( k ), m_channel( c ), m_message( m ) { 64 :m_keyCode( k ), m_channel( c ), m_message( m ) {
64} 65}
65 66
66int QCopKeyRegister::keyCode()const { 67int QCopKeyRegister::keyCode()const {
67 return m_keyCode; 68 return m_keyCode;
68} 69}
69 70
@@ -188,25 +189,25 @@ bool KeyFilter::checkButtonAction(bool db, int keycode, int press, int autoRepe
188 && keycode != Key_Up 189 && keycode != Key_Up
189 && keycode != Key_Down ) 190 && keycode != Key_Down )
190 return TRUE; 191 return TRUE;
191 192
192 /* check if it was registered */ 193 /* check if it was registered */
193 if (!db ) { 194 if (!db ) {
194 if (keycode != 0 &&press && !autoRepeat && keyRegistered(keycode) ) 195 if (keycode != 0 &&press && !autoRepeat && keyRegistered(keycode) )
195 return true; 196 return true;
196 }else { 197 }else {
197 198
198 199
199 // First check to see if DeviceButtonManager knows something about this button: 200 // First check to see if DeviceButtonManager knows something about this button:
200 const Opie::ODeviceButton* button = Opie::ODevice::inst()->buttonForKeycode(keycode); 201 const ODeviceButton* button = ODevice::inst()->buttonForKeycode(keycode);
201 if (button && !autoRepeat) { 202 if (button && !autoRepeat) {
202 if ( held_tid ) { 203 if ( held_tid ) {
203 killTimer(held_tid); 204 killTimer(held_tid);
204 held_tid = 0; 205 held_tid = 0;
205 } 206 }
206 if ( button->heldAction().isNull() ) { 207 if ( button->heldAction().isNull() ) {
207 if ( press ) 208 if ( press )
208 emit activate(button, FALSE); 209 emit activate(button, FALSE);
209 } else if ( press ) { 210 } else if ( press ) {
210 heldButton = button; 211 heldButton = button;
211 held_tid = startTimer( ODevice::inst ()->buttonHoldTime () ); 212 held_tid = startTimer( ODevice::inst ()->buttonHoldTime () );
212 } else if ( heldButton ) { 213 } else if ( heldButton ) {
@@ -322,42 +323,42 @@ ServerApplication::ServerApplication( int& argc, char **argv, Type t )
322 QTimer::singleShot(500, this, SLOT(showSafeMode()) ); 323 QTimer::singleShot(500, this, SLOT(showSafeMode()) );
323 QTimer::singleShot(20*1000, this, SLOT(clearSafeMode()) ); 324 QTimer::singleShot(20*1000, this, SLOT(clearSafeMode()) );
324#endif 325#endif
325 326
326 kf = new KeyFilter(this); 327 kf = new KeyFilter(this);
327 328
328 connect( kf, SIGNAL(launch()), this, SIGNAL(launch()) ); 329 connect( kf, SIGNAL(launch()), this, SIGNAL(launch()) );
329 connect( kf, SIGNAL(power()), this, SIGNAL(power()) ); 330 connect( kf, SIGNAL(power()), this, SIGNAL(power()) );
330 connect( kf, SIGNAL(backlight()), this, SIGNAL(backlight()) ); 331 connect( kf, SIGNAL(backlight()), this, SIGNAL(backlight()) );
331 connect( kf, SIGNAL(symbol()), this, SIGNAL(symbol())); 332 connect( kf, SIGNAL(symbol()), this, SIGNAL(symbol()));
332 connect( kf, SIGNAL(numLockStateToggle()), this,SIGNAL(numLockStateToggle())); 333 connect( kf, SIGNAL(numLockStateToggle()), this,SIGNAL(numLockStateToggle()));
333 connect( kf, SIGNAL(capsLockStateToggle()), this,SIGNAL(capsLockStateToggle())); 334 connect( kf, SIGNAL(capsLockStateToggle()), this,SIGNAL(capsLockStateToggle()));
334 connect( kf, SIGNAL(activate(const Opie::ODeviceButton*,bool)), 335 connect( kf, SIGNAL(activate(const Opie::Core::ODeviceButton*,bool)),
335 this,SIGNAL(activate(const Opie::ODeviceButton*,bool))); 336 this,SIGNAL(activate(const Opie::Core::ODeviceButton*,bool)));
336 337
337 338
338 connect( kf, SIGNAL(backlight()), this, SLOT(toggleLight()) ); 339 connect( kf, SIGNAL(backlight()), this, SLOT(toggleLight()) );
339 340
340 connect( this, SIGNAL(power() ), 341 connect( this, SIGNAL(power() ),
341 SLOT(togglePower() ) ); 342 SLOT(togglePower() ) );
342 343
343 rereadVolumes(); 344 rereadVolumes();
344 345
345 serverApp = this; 346 serverApp = this;
346 347
347 apmTimeout(); 348 apmTimeout();
348 grabKeyboard(); 349 grabKeyboard();
349 350
350 /* make sure the event filter is installed */ 351 /* make sure the event filter is installed */
351 const Opie::ODeviceButton* but = Opie::ODevice::inst()->buttonForKeycode( -1 ); 352 const ODeviceButton* but = ODevice::inst()->buttonForKeycode( -1 );
352} 353}
353 354
354 355
355ServerApplication::~ServerApplication() 356ServerApplication::~ServerApplication()
356{ 357{
357 ungrabKeyboard(); 358 ungrabKeyboard();
358 359
359 360
360 delete pa; 361 delete pa;
361 delete m_ps; 362 delete m_ps;
362 delete m_ps_last; 363 delete m_ps_last;
363} 364}