From 77f36813acb28ab8604f92cd5d78ffd855b50bf7 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 5 Jul 2013 18:30:06 +0200 Subject: [PATCH] Fix XBoard hover command --- dialogs.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/dialogs.c b/dialogs.c index a7d30f6..05aff38 100644 --- a/dialogs.c +++ b/dialogs.c @@ -2144,7 +2144,11 @@ Exp (int n, int x, int y) if(SeekGraphClick(Press, x, y, 1)) return NULL; if(but1 && !PromoScroll(x, y)) DragPieceMove(x, y); if(but3) MovePV(x, y, lineGap + BOARD_HEIGHT * (squareSize + lineGap)); - if(appData.highlightDragging) HoverEvent(hi2X, hi2Y, x, y); + if(appData.highlightDragging) { + x = EventToSquare(x, BOARD_WIDTH); if ( flipView && x >= 0) x = BOARD_WIDTH - 1 - x; + y = EventToSquare(y, BOARD_HEIGHT); if (!flipView && y >= 0) y = BOARD_HEIGHT - 1 - y; + HoverEvent(hi2X, hi2Y, x, y); + } return NULL; } if(n != 10 && PopDown(PromoDlg)) fromX = fromY = -1; // user starts fiddling with board when promotion dialog is up -- 1.7.0.4