case Expose:
restart = 1;
break;
+ default:
+ screenhack_handle_event(dpy, &e);
+ break;
}
return(1);
}
}
}
}
- XSync(dpy, 0);
+ XSync(dpy, False);
}
static void
solve_maze (void) /* solve it with graphical feedback */
{
- int i, dir, from, x, y, ways, bt;
+ int i, dir, from, x, y, ways, bt = 0;
/* plug up the surrounding wall */
maze[end_x][end_y] |= (WALL_TOP >> end_dir);
set_maze_sizes (xgwa.width, xgwa.height);
if (! root)
- XSelectInput (dpy, win, ExposureMask|ButtonPressMask|StructureNotifyMask);
+ {
+ XWindowAttributes xgwa;
+ XGetWindowAttributes (dpy, window, &xgwa);
+ XSelectInput (dpy, win,
+ xgwa.your_event_mask | ExposureMask |
+ ButtonPressMask |StructureNotifyMask);
+ }
gc = XCreateGC(dpy, win, 0, 0);
cgc = XCreateGC(dpy, win, 0, 0);