From 765ca4070bb6f095fc58c030f2154ed03857701d Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 29 Aug 2026 19:44:29 +0200 Subject: render: re-evaluate mouse col/row coordinates after a window resize Before this, the col/row coordinates for the mouse pointer was only updated when the mouse either entered our window, or was moved inside it. However, when a window is resized without using the mouse, and the user then clicks (again, without moving the mouse), we can get a button event outside the cell grid, that we still think is on top of the grid. Example: user moves mouse over the bottom row. The window is shrunk. Enough that the mouse is now outside the cell grid, but still inside our window. This means we get a button event outside the grid. But since we haven't updated the col/row coordinates, we think it's on a row, that no longer exists. Closes #2435 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index bfff027d..0b7fd9db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -143,6 +143,9 @@ available. * Crash when a buggy compositor sends a `keyboard_enter()` event with a `NULL` surface ([#2438][2438]). +* Crash when clicking without moving the mouse after resizing the + window, and the clicked area is now outside the cell grid + ([#2435][2435]). [2353]: https://codeberg.org/dnkl/foot/issues/2353 [2352]: https://codeberg.org/dnkl/foot/issues/2352 @@ -156,6 +159,7 @@ [2411]: https://codeberg.org/dnkl/foot/issues/2411 [2405]: https://codeberg.org/dnkl/foot/issues/2405 [2438]: https://codeberg.org/dnkl/foot/issues/2438 +[2435]: https://codeberg.org/dnkl/foot/issues/2435 ### Security -- cgit v1.3