mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-11-16 07:48:07 +01:00
bug fix: clear focusHasDived on pen event along with other focus state
This commit is contained in:
parent
23b85f5437
commit
5b34e786bc
2 changed files with 7 additions and 9 deletions
|
@ -2219,6 +2219,7 @@ board_handlePenDown( BoardCtxt* board, XP_U16 x, XP_U16 y, XP_Bool* handled )
|
|||
/* clear focus as soon as pen touches board */
|
||||
result = invalFocusOwner( board );
|
||||
board->focussed = OBJ_NONE;
|
||||
board->focusHasDived = XP_FALSE;
|
||||
#endif
|
||||
|
||||
switch ( onWhich ) {
|
||||
|
@ -2897,18 +2898,15 @@ rectContainsPt( XP_Rect* rect, XP_S16 x, XP_S16 y )
|
|||
} /* rectContainsPt */
|
||||
|
||||
XP_Bool
|
||||
rectsIntersect(XP_Rect* rectP1, XP_Rect* rectP2)
|
||||
rectsIntersect( const XP_Rect* rect1, const XP_Rect* rect2 )
|
||||
{
|
||||
XP_Rect rect1 = *rectP1;
|
||||
XP_Rect rect2 = *rectP2;
|
||||
|
||||
if ( rect1.top >= rect2.top + rect2.height ) {
|
||||
if ( rect1->top >= rect2->top + rect2->height ) {
|
||||
return XP_FALSE;
|
||||
} else if ( rect1.left >= rect2.left + rect2.width ) {
|
||||
} else if ( rect1->left >= rect2->left + rect2->width ) {
|
||||
return XP_FALSE;
|
||||
} else if ( rect2.top >= rect1.top + rect1.height ) {
|
||||
} else if ( rect2->top >= rect1->top + rect1->height ) {
|
||||
return XP_FALSE;
|
||||
} else if ( rect2.left >= rect1.left + rect1.width ) {
|
||||
} else if ( rect2->left >= rect1->left + rect1->width ) {
|
||||
return XP_FALSE;
|
||||
} else {
|
||||
return XP_TRUE;
|
||||
|
|
|
@ -193,7 +193,7 @@ XP_U16 indexForBits( XP_U8 bits );
|
|||
XP_Bool rectContainsPt( XP_Rect* rect1, XP_S16 x, XP_S16 y );
|
||||
XP_Bool checkRevealTray( BoardCtxt* board );
|
||||
void invalTilesUnderRect( BoardCtxt* board, XP_Rect* rect );
|
||||
XP_Bool rectsIntersect( XP_Rect* rect1, XP_Rect* rect2 );
|
||||
XP_Bool rectsIntersect( const XP_Rect* rect1, const XP_Rect* rect2 );
|
||||
|
||||
void board_selectPlayer( BoardCtxt* board, XP_U16 newPlayer );
|
||||
|
||||
|
|
Loading…
Reference in a new issue