shithub: puzzles

Download patch

ref: ecb3a9d6f219e95c694d7857f579c9ef2ebad064
parent: 56237fa5fa0c2c56785f3667cb7d013dc9779352
author: Ben Harris <bjh21@bjh21.me.uk>
date: Mon Jul 31 19:02:45 EDT 2023

Same Game: don't hide keyboard cursor on unrecognised keys

Pressing "undo", for instance, should leave the keyboard cursor
visible if it's visible already.  Only mouse clicks should hide it.

--- a/samegame.c
+++ b/samegame.c
@@ -1289,9 +1289,8 @@
     int tx, ty;
     char *ret = MOVE_UI_UPDATE;
 
-    ui->displaysel = false;
-
     if (button == RIGHT_BUTTON || button == LEFT_BUTTON) {
+        ui->displaysel = false;
 	tx = FROMCOORD(x); ty= FROMCOORD(y);
     } else if (IS_CURSOR_MOVE(button)) {
 	int dx = 0, dy = 0;