summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2024-03-26 22:20:02 +0100
committerMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2024-03-28 20:22:49 +0100
commit48ea01932203d810a6e01d5fa292ca124d72b8f0 (patch)
treea48566d40870c74f2e6e13359714655918ec5cb2 /tests
parent7d151c83811f8ac8873439826c16d88c83aba12f (diff)
downloadredot-engine-48ea01932203d810a6e01d5fa292ca124d72b8f0.tar.gz
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/scene/test_code_edit.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/scene/test_code_edit.h b/tests/scene/test_code_edit.h
index bc2f7f51b1..b0a46b8107 100644
--- a/tests/scene/test_code_edit.h
+++ b/tests/scene/test_code_edit.h
@@ -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. */