From: H.G. Muller Date: Fri, 5 Jul 2013 16:30:06 +0000 (+0200) Subject: Fix XBoard hover command X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=77f36813acb28ab8604f92cd5d78ffd855b50bf7;p=xboard.git Fix XBoard hover command --- 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