summaryrefslogtreecommitdiff
path: root/core
Unidiff
Diffstat (limited to 'core') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/serverapp.cpp16
-rw-r--r--core/launcher/serverapp.h2
2 files changed, 15 insertions, 3 deletions
diff --git a/core/launcher/serverapp.cpp b/core/launcher/serverapp.cpp
index 75d4ac1..6fe0479 100644
--- a/core/launcher/serverapp.cpp
+++ b/core/launcher/serverapp.cpp
@@ -146,3 +146,3 @@ 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),firedHeldButton(0)
148{ 148{
@@ -161,2 +161,3 @@ void KeyFilter::timerEvent(QTimerEvent* e)
161 emit activate(heldButton, TRUE); 161 emit activate(heldButton, TRUE);
162 firedHeldButton = heldButton;
162 heldButton = 0; 163 heldButton = 0;
@@ -204,2 +205,3 @@ bool KeyFilter::checkButtonAction(bool db, int keycode, int press, int autoRepe
204 205
206// odebug << " KeyFilter::checkButtonAction("<<db<<","<<keycode<<","<<press<<","<<autoRepeat<<")"<<oendl;
205 /* check if it was registered */ 207 /* check if it was registered */
@@ -209,3 +211,2 @@ bool KeyFilter::checkButtonAction(bool db, int keycode, int press, int autoRepe
209 } else { 211 } else {
210
211 // First check to see if DeviceButtonManager knows something about this button: 212 // First check to see if DeviceButtonManager knows something about this button:
@@ -213,2 +214,3 @@ bool KeyFilter::checkButtonAction(bool db, int keycode, int press, int autoRepe
213 if (button && !autoRepeat) { 214 if (button && !autoRepeat) {
215 if (firedHeldButton) {
214 if ( held_tid ) { 216 if ( held_tid ) {
@@ -217,2 +219,10 @@ bool KeyFilter::checkButtonAction(bool db, int keycode, int press, int autoRepe
217 } 219 }
220 if (!press && button == firedHeldButton) {
221 firedHeldButton = 0;
222 return TRUE;
223 }
224 } else if ( held_tid && heldButton != button) {
225 killTimer(held_tid);
226 held_tid = 0;
227 }
218 if ( button->heldAction().isNull() ) { 228 if ( button->heldAction().isNull() ) {
@@ -221,4 +231,6 @@ bool KeyFilter::checkButtonAction(bool db, int keycode, int press, int autoRepe
221 } else if ( press ) { 231 } else if ( press ) {
232 if (heldButton != button) {
222 heldButton = button; 233 heldButton = button;
223 held_tid = startTimer( ODevice::inst ()->buttonHoldTime () ); 234 held_tid = startTimer( ODevice::inst ()->buttonHoldTime () );
235 }
224 } else if ( heldButton ) { 236 } else if ( heldButton ) {
diff --git a/core/launcher/serverapp.h b/core/launcher/serverapp.h
index 27be28b..98c5633 100644
--- a/core/launcher/serverapp.h
+++ b/core/launcher/serverapp.h
@@ -83,3 +83,3 @@ private:
83 int held_tid; 83 int held_tid;
84 const Opie::Core::ODeviceButton* heldButton; 84 const Opie::Core::ODeviceButton* heldButton,*firedHeldButton;
85 KeyRegisterList m_keys; 85 KeyRegisterList m_keys;