summaryrefslogtreecommitdiffstats
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt13
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/Godot.kt7
-rw-r--r--platform/ios/export/export_plugin.cpp22
-rw-r--r--platform/linuxbsd/x11/display_server_x11.cpp2
-rw-r--r--platform/macos/display_server_macos.mm3
-rw-r--r--platform/macos/export/export_plugin.cpp12
-rw-r--r--platform/windows/display_server_windows.cpp4
7 files changed, 29 insertions, 34 deletions
diff --git a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt
index 02709d4dc5..0d7017ae71 100644
--- a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt
+++ b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.kt
@@ -221,16 +221,9 @@ open class GodotEditor : GodotActivity() {
val runningProcesses = activityManager.runningAppProcesses
for (runningProcess in runningProcesses) {
if (runningProcess.processName.endsWith(processNameSuffix)) {
- if (targetClass == null) {
- // Killing process directly
- Log.v(TAG, "Killing Godot process ${runningProcess.processName}")
- Process.killProcess(runningProcess.pid)
- } else {
- // Activity is running; sending a request for self termination.
- Log.v(TAG, "Sending force quit request to $targetClass running on process ${runningProcess.processName}")
- val forceQuitIntent = Intent(this, targetClass).putExtra(EXTRA_FORCE_QUIT, true)
- startActivity(forceQuitIntent)
- }
+ // Killing process directly
+ Log.v(TAG, "Killing Godot process ${runningProcess.processName}")
+ Process.killProcess(runningProcess.pid)
return true
}
}
diff --git a/platform/android/java/lib/src/org/godotengine/godot/Godot.kt b/platform/android/java/lib/src/org/godotengine/godot/Godot.kt
index 38961bcda8..2278b46f6c 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/Godot.kt
+++ b/platform/android/java/lib/src/org/godotengine/godot/Godot.kt
@@ -536,8 +536,11 @@ class Godot(private val context: Context) : SensorEventListener {
for (plugin in pluginRegistry.allPlugins) {
plugin.onMainDestroy()
}
- GodotLib.ondestroy()
- forceQuit()
+
+ runOnRenderThread {
+ GodotLib.ondestroy()
+ forceQuit()
+ }
}
/**
diff --git a/platform/ios/export/export_plugin.cpp b/platform/ios/export/export_plugin.cpp
index c0e052865f..6bc3241425 100644
--- a/platform/ios/export/export_plugin.cpp
+++ b/platform/ios/export/export_plugin.cpp
@@ -2074,15 +2074,21 @@ bool EditorExportPlatformIOS::is_package_name_valid(const String &p_package, Str
bool EditorExportPlatformIOS::_check_xcode_install() {
static bool xcode_found = false;
if (!xcode_found) {
- String xcode_path;
- List<String> args;
- args.push_back("-p");
- int ec = 0;
- Error err = OS::get_singleton()->execute("xcode-select", args, &xcode_path, &ec, true);
- if (err != OK || ec != 0) {
- return false;
+ Vector<String> mdfind_paths;
+ List<String> mdfind_args;
+ mdfind_args.push_back("kMDItemCFBundleIdentifier=com.apple.dt.Xcode");
+
+ String output;
+ Error err = OS::get_singleton()->execute("mdfind", mdfind_args, &output);
+ if (err == OK) {
+ mdfind_paths = output.split("\n");
+ }
+ for (const String &found_path : mdfind_paths) {
+ xcode_found = !found_path.is_empty() && DirAccess::dir_exists_absolute(found_path.strip_edges());
+ if (xcode_found) {
+ break;
+ }
}
- xcode_found = DirAccess::dir_exists_absolute(xcode_path.strip_edges());
}
return xcode_found;
}
diff --git a/platform/linuxbsd/x11/display_server_x11.cpp b/platform/linuxbsd/x11/display_server_x11.cpp
index 3bafdfb53d..e1d842422c 100644
--- a/platform/linuxbsd/x11/display_server_x11.cpp
+++ b/platform/linuxbsd/x11/display_server_x11.cpp
@@ -3875,7 +3875,7 @@ void DisplayServerX11::_xim_preedit_draw_callback(::XIM xim, ::XPointer client_d
ds->im_selection = Point2i();
}
- OS_Unix::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_OS_IME_UPDATE);
+ OS_Unix::get_singleton()->get_main_loop()->call_deferred(SNAME("notification"), MainLoop::NOTIFICATION_OS_IME_UPDATE);
}
}
diff --git a/platform/macos/display_server_macos.mm b/platform/macos/display_server_macos.mm
index 2a6f17cb5d..407a315827 100644
--- a/platform/macos/display_server_macos.mm
+++ b/platform/macos/display_server_macos.mm
@@ -725,7 +725,8 @@ void DisplayServerMacOS::update_mouse_pos(DisplayServerMacOS::WindowData &p_wd,
}
void DisplayServerMacOS::pop_last_key_event() {
- if (key_event_pos > 0) {
+ // Does not pop last key event when it is an IME key event.
+ if (key_event_pos > 0 && key_event_buffer[key_event_pos - 1].raw) {
key_event_pos--;
}
}
diff --git a/platform/macos/export/export_plugin.cpp b/platform/macos/export/export_plugin.cpp
index 24cb76b4ab..8761fe22e3 100644
--- a/platform/macos/export/export_plugin.cpp
+++ b/platform/macos/export/export_plugin.cpp
@@ -2026,9 +2026,9 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
bool EditorExportPlatformMacOS::has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates, bool p_debug) const {
String err;
- // Look for export templates (custom templates).
- bool dvalid = false;
- bool rvalid = false;
+ // Look for export templates (official templates first, then custom).
+ bool dvalid = exists_export_template("macos.zip", &err);
+ bool rvalid = dvalid; // Both in the same ZIP.
if (p_preset->get("custom_template/debug") != "") {
dvalid = FileAccess::exists(p_preset->get("custom_template/debug"));
@@ -2043,12 +2043,6 @@ bool EditorExportPlatformMacOS::has_valid_export_configuration(const Ref<EditorE
}
}
- // Look for export templates (official templates, check only is custom templates are not set).
- if (!dvalid || !rvalid) {
- dvalid = exists_export_template("macos.zip", &err);
- rvalid = dvalid; // Both in the same ZIP.
- }
-
bool valid = dvalid || rvalid;
r_missing_templates = !valid;
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index e8d81405f0..c801ca96e7 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -2958,9 +2958,7 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
}
} break;
case WM_MOUSEACTIVATE: {
- if (windows[window_id].no_focus) {
- return MA_NOACTIVATEANDEAT; // Do not activate, and discard mouse messages.
- } else if (windows[window_id].is_popup) {
+ if (windows[window_id].no_focus || windows[window_id].is_popup) {
return MA_NOACTIVATE; // Do not activate, but process mouse messages.
}
} break;