Patch: enable mixed mouse+keyboard input in Sudoku
|Reported by:||Stef||Owned by:||axeld|
|Has a Patch:||no||Platform:||All|
Currently, Sudoku supports either mouse input (point at cell, click to insert numbers) or keyboard input (arrow keys select cell, type numbers to insert them). When attempting to combine the two (point to select cells, type a number to insert it) weird things happen.
The first keypress selects the cell under the mouse cursor (blue outline). The second keypress inserts the number in this cell. However, when forcing a repaint (drag the window off the screen and back), it can be seen that the first keypress inserts the number at the previous keyboard position without updating the screen.
The attached patch does not address the repaint issue directly. Instead, it always sets the keyboard input position to the mouse input position (if valid). Not only does this solve this issue, it also enables mixed input as described above (point and type).