diff --git a/xwords4/palm/Makefile b/xwords4/palm/Makefile index 03994475f..2784b8324 100644 --- a/xwords4/palm/Makefile +++ b/xwords4/palm/Makefile @@ -103,7 +103,7 @@ endif MYDEFS_COMMON = $(PASSTHRU) -DXW_FEATURE_UTILS -DPOINTER_SUPPORT \ -DKEY_SUPPORT -DOVERRIDE_EDGE_FOR_INDEX -DCOLOR_SUPPORT \ - -DSHOW_PROGRESS $(HASHDEF) -DNO_REG_REQUIRED + -DSHOW_PROGRESS $(HASHDEF) -DNO_REG_REQUIRED -DPERIMETER_FOCUS # turn on letting users pick tiles "face-up" MYDEFS_COMMON += -DFEATURE_TRAY_EDIT diff --git a/xwords4/palm/palmdraw.c b/xwords4/palm/palmdraw.c index dfb34aabc..aba843e91 100644 --- a/xwords4/palm/palmdraw.c +++ b/xwords4/palm/palmdraw.c @@ -1,6 +1,7 @@ /* -*-mode: C; fill-column: 77; c-basic-offset: 4; compile-command: "make ARCH=68K_ONLY MEMDEBUG=TRUE";-*- */ /* - * Copyright 1999 - 2006 by Eric House (xwords@eehouse.org). All rights reserved. + * Copyright 1999 - 2007 by Eric House (xwords@eehouse.org). All rights + * reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -41,6 +42,9 @@ #define TILE_SUBSCRIPT 1 /* draw tile with numbers below letters? */ +/* Let's try both for a while */ +#define DRAW_FOCUS_FRAME 1 + static XP_Bool palm_common_draw_drawCell( DrawCtx* p_dctx, const XP_Rect* rect, const XP_UCHAR* letters, XP_Bitmap bitmap, Tile tile, @@ -246,6 +250,9 @@ palm_common_draw_boardBegin( DrawCtx* p_dctx, const DictionaryCtxt* dict, checkFontOffsets( dctx, dict ); +#ifdef DRAW_FOCUS_FRAME + dctx->topFocus = dfs == DFS_TOP; +#endif return XP_TRUE; } /* palm_common_draw_boardBegin */ @@ -274,7 +281,7 @@ palm_draw_objFinished( DrawCtx* p_dctx, BoardObjectType typ, const XP_Rect* rect, DrawFocusState dfs ) { PalmDrawCtx* dctx = (PalmDrawCtx*)p_dctx; -#ifdef XWFEATURE_FIVEWAY +#if defined XWFEATURE_FIVEWAY && defined DRAW_FOCUS_FRAME if ( (dfs == DFS_TOP) && (typ == OBJ_BOARD) ) { XP_Rect r; XP_U16 i; @@ -316,9 +323,12 @@ palm_clr_draw_drawCell( DrawCtx* p_dctx, const XP_Rect* rect, PalmDrawCtx* dctx = (PalmDrawCtx*)p_dctx; IndexedColorType color; XP_U16 index; - XP_Bool isCursor = (flags & CELL_ISCURSOR) != 0; + XP_Bool isCursor = (flags & CELL_ISCURSOR) != 0 +#ifdef DRAW_FOCUS_FRAME + && !dctx->topFocus +#endif + ; XP_Bool isPending = (flags & CELL_HIGHLIGHT) != 0; - if ( isCursor ) { index = COLOR_CURSOR; } else if ( isPending ) { @@ -1370,15 +1380,6 @@ palm_draw_drawMiniWindow( DrawCtx* p_dctx, const XP_UCHAR* text, HIGHRES_POP_LOC( dctx ); } /* palm_draw_drawMiniWindow */ -static void -palm_draw_eraseMiniWindow( DrawCtx* XP_UNUSED(p_dctx), - const XP_Rect* XP_UNUSED(rect), - XP_Bool XP_UNUSED(lastTime), - void** XP_UNUSED(closure), XP_Bool* invalUnder ) -{ - *invalUnder = XP_TRUE; -} /* palm_draw_eraseMiniWindow */ - static void draw_doNothing( DrawCtx* XP_UNUSED(dctx), ... ) { @@ -1437,7 +1438,6 @@ palm_drawctxt_make( MPFORMAL GraphicsAbility able, SET_VTABLE_ENTRY( dctx->vtable, draw_getMiniWText, palm ); SET_VTABLE_ENTRY( dctx->vtable, draw_measureMiniWText, palm ); SET_VTABLE_ENTRY( dctx->vtable, draw_drawMiniWindow, palm ); - SET_VTABLE_ENTRY( dctx->vtable, draw_eraseMiniWindow, palm ); if ( able == COLOR ) { #ifdef COLOR_SUPPORT