summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/serverapp.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/launcher/serverapp.cpp b/core/launcher/serverapp.cpp
index fac52a6..64c97d4 100644
--- a/core/launcher/serverapp.cpp
+++ b/core/launcher/serverapp.cpp
@@ -39,55 +39,55 @@ using namespace Opie::Core;
39#ifdef Q_WS_QWS 39#ifdef Q_WS_QWS
40#include <qgfx_qws.h> 40#include <qgfx_qws.h>
41#endif 41#endif
42#include <qmessagebox.h> 42#include <qmessagebox.h>
43#include <qtimer.h> 43#include <qtimer.h>
44#include <qpainter.h> 44#include <qpainter.h>
45#include <qfile.h> 45#include <qfile.h>
46#include <qpixmapcache.h> 46#include <qpixmapcache.h>
47 47
48/* STD */ 48/* STD */
49#ifdef Q_OS_WIN32 49#ifdef Q_OS_WIN32
50#include <io.h> 50#include <io.h>
51#include <process.h> 51#include <process.h>
52#else 52#else
53#include <unistd.h> 53#include <unistd.h>
54#endif 54#endif
55#include <stdlib.h> 55#include <stdlib.h>
56 56
57static ServerApplication *serverApp = 0; 57static ServerApplication *serverApp = 0;
58static int loggedin=0; 58static int loggedin=0;
59 59
60QCopKeyRegister::QCopKeyRegister() 60QCopKeyRegister::QCopKeyRegister()
61 : m_keyCode( 0 ) 61 : m_keyCode( 0 )
62{ 62{
63odebug << "KeyRegister1 " << m_keyCode << oendl; 63
64} 64}
65 65
66QCopKeyRegister::QCopKeyRegister( int k, const QCString& c, const QCString& m ) 66QCopKeyRegister::QCopKeyRegister( int k, const QCString& c, const QCString& m )
67 :m_keyCode( k ), m_channel( c ), m_message( m ) 67 :m_keyCode( k ), m_channel( c ), m_message( m )
68{ 68{
69odebug << "keyRegister2 " << m_keyCode << c << m << oendl; 69
70} 70}
71 71
72int QCopKeyRegister::keyCode() const 72int QCopKeyRegister::keyCode() const
73{ 73{
74 return m_keyCode; 74 return m_keyCode;
75} 75}
76 76
77QCString QCopKeyRegister::channel() const 77QCString QCopKeyRegister::channel() const
78{ 78{
79 return m_channel; 79 return m_channel;
80} 80}
81 81
82QCString QCopKeyRegister::message() const 82QCString QCopKeyRegister::message() const
83{ 83{
84 return m_message; 84 return m_message;
85} 85}
86 86
87bool QCopKeyRegister::send() 87bool QCopKeyRegister::send()
88{ 88{
89 if (m_channel.isNull() ) 89 if (m_channel.isNull() )
90 return false; 90 return false;
91qDebug("Send Message: "+m_channel+" "+m_message); 91qDebug("Send Message: "+m_channel+" "+m_message);
92 QCopEnvelope e( m_channel, m_message ); 92 QCopEnvelope e( m_channel, m_message );
93 93
@@ -146,49 +146,49 @@ void DesktopPowerAlerter::hideEvent( QHideEvent *e )
146 146
147KeyFilter::KeyFilter(QObject* parent) : QObject(parent), held_tid(0), heldButton(0) 147KeyFilter::KeyFilter(QObject* parent) : QObject(parent), held_tid(0), heldButton(0)
148{ 148{
149 /* We don't do this cause it would interfere with ODevice */ 149 /* We don't do this cause it would interfere with ODevice */
150#if 0 150#if 0
151 qwsServer->setKeyboardFilter(this); 151 qwsServer->setKeyboardFilter(this);
152#endif 152#endif
153} 153}
154 154
155void KeyFilter::timerEvent(QTimerEvent* e) 155void KeyFilter::timerEvent(QTimerEvent* e)
156{ 156{
157 if ( e->timerId() == held_tid ) { 157 if ( e->timerId() == held_tid ) {
158 killTimer(held_tid); 158 killTimer(held_tid);
159 // button held 159 // button held
160 if ( heldButton ) { 160 if ( heldButton ) {
161 emit activate(heldButton, TRUE); 161 emit activate(heldButton, TRUE);
162 heldButton = 0; 162 heldButton = 0;
163 } 163 }
164 held_tid = 0; 164 held_tid = 0;
165 } 165 }
166} 166}
167 167
168void KeyFilter::registerKey( const QCopKeyRegister& key ) 168void KeyFilter::registerKey( const QCopKeyRegister& key )
169{ 169{
170odebug << "KeyFilter::registerKey " << key.keyCode() << key.channel() << key.message() << oendl; 170
171 m_keys.insert( key.keyCode(), key ); 171 m_keys.insert( key.keyCode(), key );
172} 172}
173 173
174void KeyFilter::unregisterKey( const QCopKeyRegister& key ) 174void KeyFilter::unregisterKey( const QCopKeyRegister& key )
175{ 175{
176 m_keys.remove( key.keyCode() ); 176 m_keys.remove( key.keyCode() );
177} 177}
178 178
179bool KeyFilter::keyRegistered( int key ) 179bool KeyFilter::keyRegistered( int key )
180{ 180{
181 /* 181 /*
182 * Check if we've a key registered 182 * Check if we've a key registered
183 */ 183 */
184 if ( !m_keys[key].send()) 184 if ( !m_keys[key].send())
185 return false; 185 return false;
186 else 186 else
187 return true; 187 return true;
188} 188}
189 189
190bool KeyFilter::checkButtonAction(bool db, int keycode, int press, int autoRepeat) 190bool KeyFilter::checkButtonAction(bool db, int keycode, int press, int autoRepeat)
191{ 191{
192 if ( !loggedin 192 if ( !loggedin
193 // Permitted keys 193 // Permitted keys
194 && keycode != Key_F34 // power 194 && keycode != Key_F34 // power