[macOS] Use native window drag for the custom editor title bars.
This commit is contained in:
@@ -54,8 +54,12 @@ void EditorTitleBar::gui_input(const Ref<InputEvent> &p_event) {
|
||||
if (w) {
|
||||
if (mb->get_button_index() == MouseButton::LEFT) {
|
||||
if (mb->is_pressed()) {
|
||||
click_pos = DisplayServer::get_singleton()->mouse_get_position() - w->get_position();
|
||||
moving = true;
|
||||
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_WINDOW_DRAG)) {
|
||||
DisplayServer::get_singleton()->window_start_drag(w->get_window_id());
|
||||
} else {
|
||||
click_pos = DisplayServer::get_singleton()->mouse_get_position() - w->get_position();
|
||||
moving = true;
|
||||
}
|
||||
} else {
|
||||
moving = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user