+ if (IS_CURSOR_MOVE(button)) {
+ int cx = ui->cur_x, cy = ui->cur_y;
+
+ move_cursor(button, &cx, &cy, state->w+2, state->h+2, 0);
+ if ((cx == 0 && cy == 0 && !CAN_REVEAL(state)) ||
+ (cx == 0 && cy == state->h+1) ||
+ (cx == state->w+1 && cy == 0) ||
+ (cx == state->w+1 && cy == state->h+1))
+ return NULL; /* disallow moving cursor to corners. */
+ ui->cur_x = cx;
+ ui->cur_y = cy;
+ ui->cur_visible = 1;
+ return "";
+ }
+