}
}
+ fclose(fp);
+
/* create Pixmap of piece */
*dest = XCreatePixmap(xDisplay, DefaultRootWindow(xDisplay),
w, h, xim->depth);
* but this causes a very distracting flicker.
*/
- if ( lineGap && IsDrawArrowEnabled()) repaint = True;
if (!repaint && lastBoardValid[nr] && (nr == 1 || lastFlipView == flipView)) {
+ if ( lineGap && IsDrawArrowEnabled())
+ XDrawSegments(xDisplay, xBoardWindow, lineGC,
+ gridSegments, BOARD_HEIGHT + BOARD_WIDTH + 2);
+
/* If too much changes (begin observing new game, etc.), don't
do flashing */
do_flash = too_many_diffs(board, lastBoard[nr]) ? 0 : 1;
XTranslateCoordinates(xDisplay, XtWindow(shellWidget),
RootWindowOfScreen(XtScreen(shellWidget)),
(bw_width - w) / 2, 0 - h / 2, &xx, &yy, &junk);
-#endif /*!NOTDEF*/
x = xx;
y = yy;
+#endif /*!NOTDEF*/
if (y < 0) y = 0; /*avoid positioning top offscreen*/
j = 0;
rewind(f);
selection_tmp = XtMalloc(len + 1);
count = fread(selection_tmp, 1, len, f);
+ fclose(f);
if (len != count) {
XtFree(selection_tmp);
return False;
DrawArrowBetweenPoints( s_x, s_y, d_x, d_y );
- if(lineGap == 0) {
- // this is a good idea, but it only works when lineGap == 0, because 'damage' on grid lines is not repaired
- hor = 64*s_col + 32; vert = 64*s_row + 32;
- for(i=0; i<= 64; i++) {
+ hor = 64*s_col + 32; vert = 64*s_row + 32;
+ for(i=0; i<= 64; i++) {
damage[0][vert+6>>6][hor+6>>6] = True;
damage[0][vert-6>>6][hor+6>>6] = True;
damage[0][vert+6>>6][hor-6>>6] = True;
damage[0][vert-6>>6][hor-6>>6] = True;
hor += d_col - s_col; vert += d_row - s_row;
- }
}
}