diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-01-20 12:47:05 +0200 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-01-20 12:47:05 +0200 |
commit | 4b2323e0303434c90935585b5d5c03b3d3e0f23c (patch) | |
tree | cc93dc1f836c86f0c0e2ef95ef48102e022929a6 | |
parent | 28a24639c3c6a95b5b9828f5f02bf0dc2f5ce54b (diff) |
[macOS] Move extended title bar input to _gui_input and add mouse filters to prevent editor buttons from passing double-click to title.
-rw-r--r-- | editor/editor_node.cpp | 1 | ||||
-rw-r--r-- | editor/editor_title_bar.cpp | 2 | ||||
-rw-r--r-- | editor/editor_title_bar.h | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index b0278030f9..f6afe5e5b3 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -6755,6 +6755,7 @@ EditorNode::EditorNode() { project_title->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS); project_title->set_vertical_alignment(VERTICAL_ALIGNMENT_CENTER); project_title->set_h_size_flags(Control::SIZE_EXPAND_FILL); + project_title->set_mouse_filter(Control::MOUSE_FILTER_PASS); left_spacer->add_child(project_title); } diff --git a/editor/editor_title_bar.cpp b/editor/editor_title_bar.cpp index 0271bbd64a..ae5cdfd72b 100644 --- a/editor/editor_title_bar.cpp +++ b/editor/editor_title_bar.cpp @@ -30,7 +30,7 @@ #include "editor/editor_title_bar.h" -void EditorTitleBar::input(const Ref<InputEvent> &p_event) { +void EditorTitleBar::gui_input(const Ref<InputEvent> &p_event) { if (!can_move) { return; } diff --git a/editor/editor_title_bar.h b/editor/editor_title_bar.h index 6cac163830..4055476b82 100644 --- a/editor/editor_title_bar.h +++ b/editor/editor_title_bar.h @@ -42,7 +42,7 @@ class EditorTitleBar : public HBoxContainer { bool can_move = false; protected: - virtual void input(const Ref<InputEvent> &p_event) override; + virtual void gui_input(const Ref<InputEvent> &p_event) override; static void _bind_methods(){}; public: |