-rw-r--r-- | core/launcher/serverapp.cpp | 9 |
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 | |||
@@ -50,16 +50,17 @@ | |||
50 | #include <stdlib.h> | 50 | #include <stdlib.h> |
51 | #include "screensaver.h" | 51 | #include "screensaver.h" |
52 | 52 | ||
53 | static ServerApplication *serverApp = 0; | 53 | static ServerApplication *serverApp = 0; |
54 | static int loggedin=0; | 54 | static int loggedin=0; |
55 | 55 | ||
56 | using namespace Opie; | 56 | using namespace Opie; |
57 | 57 | ||
58 | using namespace Opie::Core; | ||
58 | QCopKeyRegister::QCopKeyRegister() | 59 | QCopKeyRegister::QCopKeyRegister() |
59 | : m_keyCode( 0 ) { | 60 | : m_keyCode( 0 ) { |
60 | } | 61 | } |
61 | 62 | ||
62 | QCopKeyRegister::QCopKeyRegister( int k, const QCString& c, const QCString& m ) | 63 | QCopKeyRegister::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 | ||
@@ -192,17 +193,17 @@ bool KeyFilter::checkButtonAction(bool db, int keycode, int press, int autoRepe | |||
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); |
@@ -326,34 +327,34 @@ ServerApplication::ServerApplication( int& argc, char **argv, Type t ) | |||
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 | ||
355 | ServerApplication::~ServerApplication() | 356 | ServerApplication::~ServerApplication() |
356 | { | 357 | { |
357 | ungrabKeyboard(); | 358 | ungrabKeyboard(); |
358 | 359 | ||
359 | 360 | ||