mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-20 22:26:54 +01:00
If we get keyUp event, override earlier determination that this device doesn't get them. This works around Tungsten double-key bug. Better fix will be to use the right FtrGet constants to set generatesKeyUp.
This commit is contained in:
parent
47c3b0f7bd
commit
28dc5c7d38
1 changed files with 7 additions and 1 deletions
|
@ -972,6 +972,7 @@ initHighResGlobals( PalmAppGlobals* globals )
|
||||||
# define hsFtrIDNavigationSupported 14
|
# define hsFtrIDNavigationSupported 14
|
||||||
# endif
|
# endif
|
||||||
err = FtrGet( sysFtrCreator, sysFtrNumUIHardwareFlags, &vers );
|
err = FtrGet( sysFtrCreator, sysFtrNumUIHardwareFlags, &vers );
|
||||||
|
XP_ASSERT( errNone == err );
|
||||||
globals->generatesKeyUp = ( (err == errNone) &&
|
globals->generatesKeyUp = ( (err == errNone) &&
|
||||||
((vers & sysFtrNumUIHardwareHasKbd) != 0) )
|
((vers & sysFtrNumUIHardwareHasKbd) != 0) )
|
||||||
|| globals->isZodiac;
|
|| globals->isZodiac;
|
||||||
|
@ -2890,7 +2891,12 @@ mainViewHandleEvent( EventPtr event )
|
||||||
|
|
||||||
case keyUpEvent:
|
case keyUpEvent:
|
||||||
XP_ASSERT( globals->generatesKeyUp );
|
XP_ASSERT( globals->generatesKeyUp );
|
||||||
if ( globals->keyDownReceived ) {
|
/* work around not yet being able to set generatesKeyUp accurately
|
||||||
|
using FtrGet */
|
||||||
|
if ( !globals->generatesKeyUp ) {
|
||||||
|
globals->generatesKeyUp = XP_TRUE;
|
||||||
|
globals->keyDownReceived = XP_FALSE; /* drop the event this once */
|
||||||
|
} else if ( globals->keyDownReceived ) {
|
||||||
globals->keyDownReceived = XP_FALSE;
|
globals->keyDownReceived = XP_FALSE;
|
||||||
draw = handleKeyEvent( globals, event, &handled );
|
draw = handleKeyEvent( globals, event, &handled );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue