mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Fix a special case for button masks
In certain situations it is possible that in a `Viewport` the same mouse button is pressed twice in series without releasing it in between. In this case, focus stealing should happen to ensure, that the mouse button is not sent unintentionally to the previously focused Control node.
This commit is contained in:
@@ -3520,6 +3520,7 @@ TEST_CASE("[SceneTree][CodeEdit] completion") {
|
||||
/* Single click selects. */
|
||||
caret_pos.y += code_edit->get_line_height() * 2;
|
||||
SEND_GUI_MOUSE_BUTTON_EVENT(caret_pos, MouseButton::LEFT, MouseButtonMask::LEFT, Key::NONE);
|
||||
SEND_GUI_MOUSE_BUTTON_RELEASED_EVENT(caret_pos, MouseButton::LEFT, MouseButtonMask::NONE, Key::NONE);
|
||||
CHECK(code_edit->get_code_completion_selected_index() == 2);
|
||||
|
||||
/* Double click inserts. */
|
||||
|
||||
Reference in New Issue
Block a user