You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to implement a simple Sudoku grid. Each Cell is a node, and on clicking it, it takes focus. This works fine. It also has custom keyboard input managing to change the focus to other cells with arrowkeys. This also works fine. (Also, multiple cells can be "selected"- focusing a cell selects it, and they are unselected when another cell is focused UNLESS shift is held)
Then I went to implement selecting multiple cells via mouse drag. When I click on a cell, it gets the click event, and takes focus. Then I drag the mouse, and that cell gets Motion events. But if the mouse cursor goes to other cells, that same one cell is still getting all the motion events.
My first thought was "can non-focused cells not get events like that? huh". Except then I happened to try clicking on a cell, holding, and pressing Alt+Tab to switch windows to another window and back (without releasing the mouse at any point). Upon the window coming to the front again, the Motion events fire on whatever node is being hovered over, not only the focused cell. The fact that Alt+Tabbing out and back in changes the behavior here seemed really weird, and definitely points to some sort of bug being here. (Also, it is not just pressing Tab changing the focus- pressing only tab unfocuses the cell (as there is no Next Focus), but that same cell, even unfocused, is still the only cell to get the Motion events!)
Looking through issues, I didn't see anything that sounded specifically like this; though possibly related to #77246 ?
Click on a cell, it gains focus (drawn in red), and gains selection (blue border, but drawn behind the focus indicator)
Drag over other cells while holding click. The most recently hovered cell SHOULD be red and have focus, while every other cell SHOULD remain "selected" - however, this does NOT occur as it should, and instead the originally clicked cell gets all the InputEventMouseMotion, thus nothing else gets selected/focused.
While holding click still, Alt+Tab to another window, Alt+Tab back. Suddenly, it functions as it should.
Tested versions
System information
Godot v4.2.2.stable - Windows 10.0.19045 - Vulkan (Mobile) - dedicated AMD Radeon RX 6600 (Advanced Micro Devices, Inc.; 31.0.12027.9001) - AMD Ryzen 5 3600 6-Core Processor (12 Threads)
Issue description
I'm trying to implement a simple Sudoku grid. Each Cell is a node, and on clicking it, it takes focus. This works fine. It also has custom keyboard input managing to change the focus to other cells with arrowkeys. This also works fine. (Also, multiple cells can be "selected"- focusing a cell selects it, and they are unselected when another cell is focused UNLESS shift is held)
Then I went to implement selecting multiple cells via mouse drag. When I click on a cell, it gets the click event, and takes focus. Then I drag the mouse, and that cell gets Motion events. But if the mouse cursor goes to other cells, that same one cell is still getting all the motion events.
My first thought was "can non-focused cells not get events like that? huh". Except then I happened to try clicking on a cell, holding, and pressing Alt+Tab to switch windows to another window and back (without releasing the mouse at any point). Upon the window coming to the front again, the Motion events fire on whatever node is being hovered over, not only the focused cell. The fact that Alt+Tabbing out and back in changes the behavior here seemed really weird, and definitely points to some sort of bug being here. (Also, it is not just pressing
Tab
changing the focus- pressing only tab unfocuses the cell (as there is noNext Focus
), but that same cell, even unfocused, is still the only cell to get the Motion events!)Looking through issues, I didn't see anything that sounded specifically like this; though possibly related to #77246 ?
Steps to reproduce
Not sure how to pull out a reproducable section, so, I'll just link my repo (at a specific commit to ensure it remains reproducable): https://github.com/APSudoku/APSudoku/tree/abe60141b363d26b9d94200e094f3bd81496415b
Minimal reproduction project (MRP)
as I said above, not sure how to pull it out much more without a bunch of work. Project is at https://github.com/APSudoku/APSudoku/tree/abe60141b363d26b9d94200e094f3bd81496415b
The text was updated successfully, but these errors were encountered: