From f8a79a97c7d12da43b111a756f09ee7ad5ea28e9 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 3 Mar 2020 10:36:29 -0300 Subject: Effective DisplayServer separation, rename X11 -> LinuxBSD --- modules/gdnative/nativescript/SCsub | 2 +- modules/gdscript/language_server/gdscript_text_document.cpp | 4 +++- modules/mobile_vr/mobile_vr_interface.cpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/gdnative/nativescript/SCsub b/modules/gdnative/nativescript/SCsub index 92c9d6630d..c28a1c8659 100644 --- a/modules/gdnative/nativescript/SCsub +++ b/modules/gdnative/nativescript/SCsub @@ -5,5 +5,5 @@ Import('env_gdnative') env_gdnative.add_source_files(env.modules_sources, '*.cpp') -if "platform" in env and env["platform"] in ["x11", "iphone"]: +if "platform" in env and env["platform"] in ["linuxbsd", "iphone"]: env.Append(LINKFLAGS=["-rdynamic"]) diff --git a/modules/gdscript/language_server/gdscript_text_document.cpp b/modules/gdscript/language_server/gdscript_text_document.cpp index d5723fd20f..fbf8ef2f8f 100644 --- a/modules/gdscript/language_server/gdscript_text_document.cpp +++ b/modules/gdscript/language_server/gdscript_text_document.cpp @@ -35,6 +35,7 @@ #include "editor/plugins/script_text_editor.h" #include "gdscript_extend_parser.h" #include "gdscript_language_protocol.h" +#include "servers/display_server.h" void GDScriptTextDocument::_bind_methods() { ClassDB::bind_method(D_METHOD("didOpen"), &GDScriptTextDocument::didOpen); @@ -419,7 +420,8 @@ void GDScriptTextDocument::sync_script_content(const String &p_path, const Strin void GDScriptTextDocument::show_native_symbol_in_editor(const String &p_symbol_id) { ScriptEditor::get_singleton()->call_deferred("_help_class_goto", p_symbol_id); - OS::get_singleton()->move_window_to_foreground(); + + DisplayServer::get_singleton()->window_move_to_foreground(); } Array GDScriptTextDocument::find_symbols(const lsp::TextDocumentPositionParams &p_location, List &r_list) { diff --git a/modules/mobile_vr/mobile_vr_interface.cpp b/modules/mobile_vr/mobile_vr_interface.cpp index af429eadd5..2a4b761b73 100644 --- a/modules/mobile_vr/mobile_vr_interface.cpp +++ b/modules/mobile_vr/mobile_vr_interface.cpp @@ -31,6 +31,7 @@ #include "mobile_vr_interface.h" #include "core/input/input.h" #include "core/os/os.h" +#include "servers/display_server.h" #include "servers/visual/visual_server_globals.h" StringName MobileVRInterface::get_name() const { @@ -339,7 +340,7 @@ Size2 MobileVRInterface::get_render_targetsize() { _THREAD_SAFE_METHOD_ // we use half our window size - Size2 target_size = OS::get_singleton()->get_window_size(); + Size2 target_size = DisplayServer::get_singleton()->window_get_size(); target_size.x *= 0.5 * oversample; target_size.y *= oversample; -- cgit v1.2.3