mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-16 15:41:16 +01:00
Drop keyUp events not preceeded by keyDowns to catch leaks from
dismissed dialogs; don't drop first keyDown on OS4 since the bug that works around isn't there; turn BT back off by default.
This commit is contained in:
parent
45b47c115f
commit
aac30fffea
3 changed files with 12 additions and 4 deletions
|
@ -119,7 +119,7 @@ MYDEFS_COMMON += -DXWFEATURE_SEARCHLIMIT
|
|||
# MYDEFS_COMMON += -DXWFEATURE_RELAY
|
||||
|
||||
# turn on bluetooth comms option for 68K and ARM -- which won't work yet
|
||||
BLUETOOTH = -DXWFEATURE_BLUETOOTH
|
||||
#BLUETOOTH = -DXWFEATURE_BLUETOOTH
|
||||
#MYDEFS_COMMON += $(BLUETOOTH)
|
||||
|
||||
# Add menu allowing to choose to run 68K or ARM
|
||||
|
|
|
@ -953,6 +953,7 @@ initHighResGlobals( PalmAppGlobals* globals )
|
|||
XP_U32 vers;
|
||||
|
||||
err = FtrGet( sysFtrCreator, sysFtrNumWinVersion, &vers );
|
||||
XP_ASSERT( err == errNone );
|
||||
globals->hasHiRes = (err == errNone) && (vers >= 4) && !globals->isZodiac;
|
||||
XP_LOGF( "hasHiRes = %d", (XP_U16)globals->hasHiRes );
|
||||
globals->oneDotFiveAvail = globals->hasHiRes
|
||||
|
@ -2358,7 +2359,6 @@ handleKeyEvent( PalmAppGlobals* globals, const EventType* event,
|
|||
/* remove this and break focus drilldown. Why? */
|
||||
handled = draw;
|
||||
}
|
||||
LOG_RETURNF( "%d", draw );
|
||||
*handledP = handled;
|
||||
|
||||
globals->handlingKeyEvent = XP_FALSE;
|
||||
|
@ -2805,8 +2805,14 @@ mainViewHandleEvent( EventPtr event )
|
|||
|
||||
case keyUpEvent:
|
||||
XP_ASSERT( globals->generatesKeyUp );
|
||||
if ( globals->keyDownReceived ) {
|
||||
globals->keyDownReceived = XP_FALSE;
|
||||
draw = handleKeyEvent( globals, event, &handled );
|
||||
}
|
||||
break;
|
||||
case keyDownEvent:
|
||||
if ( !globals->menuIsDown ) {
|
||||
globals->keyDownReceived = XP_TRUE;
|
||||
draw = handleKeyEvent( globals, event, &handled );
|
||||
}
|
||||
break;
|
||||
|
@ -3176,8 +3182,9 @@ palmask( PalmAppGlobals* globals, const XP_UCHAR* str, const XP_UCHAR* yesButton
|
|||
centerControl( form, XW_ASK_YES_BUTTON_ID );
|
||||
}
|
||||
|
||||
/* This is making me puke.... :-) */
|
||||
if ( globals->handlingKeyEvent ) {
|
||||
/* If we're running OS5 (oneDotFiveAvail), then eat the first keyDown.
|
||||
If an earlier OS (Treo600) then we won't see that spurious event. */
|
||||
if ( globals->handlingKeyEvent && globals->oneDotFiveAvail ) {
|
||||
globals->ignoreFirstKeyDown = XP_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -298,6 +298,7 @@ struct PalmAppGlobals {
|
|||
XP_Bool hasTreoFiveWay;
|
||||
XP_Bool generatesKeyUp;
|
||||
XP_Bool isZodiac;
|
||||
XP_Bool keyDownReceived;
|
||||
/* PalmOS seems pretty broken w.r.t. key events. If I put up a modal
|
||||
dialog while in the process of handling a keyUp, that form gets a
|
||||
keyDown (and not with the repeat bit set either.) Hack around it. */
|
||||
|
|
Loading…
Reference in a new issue