feat: updated godot version

This commit is contained in:
Sara Gerretsen 2026-04-04 19:38:56 +02:00
parent 0c508b0831
commit 42b028dbb5
4694 changed files with 236470 additions and 401376 deletions

View file

@ -31,16 +31,11 @@
#include "embedded_process.h"
#include "core/config/project_settings.h"
#include "core/input/input.h"
#include "core/object/callable_mp.h"
#include "core/object/class_db.h" // IWYU pragma: keep. `ADD_SIGNAL` macro.
#include "core/os/os.h"
#include "editor/editor_string_names.h"
#include "scene/main/timer.h"
#include "scene/main/window.h"
#include "scene/resources/style_box_flat.h"
#include "scene/theme/theme_db.h"
#include "servers/display/display_server.h"
void EmbeddedProcessBase::_notification(int p_what) {
switch (p_what) {
@ -191,12 +186,12 @@ int EmbeddedProcess::get_embedded_pid() const {
return current_process_id;
}
void EmbeddedProcess::embed_process(ProcessID p_pid) {
void EmbeddedProcess::embed_process(OS::ProcessID p_pid) {
if (!window) {
return;
}
ERR_FAIL_COND_MSG(!DisplayServer::get_singleton()->has_feature(DisplayServerEnums::FEATURE_WINDOW_EMBEDDING), "Embedded process not supported by this display server.");
ERR_FAIL_COND_MSG(!DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_WINDOW_EMBEDDING), "Embedded process not supported by this display server.");
if (current_process_id != 0) {
// Stop embedding the last process.
@ -372,7 +367,7 @@ void EmbeddedProcess::_check_mouse_over() {
}
// Don't grab the focus if mouse over another window.
DisplayServerEnums::WindowID window_id_over = DisplayServer::get_singleton()->get_window_at_screen_position(mouse_position);
DisplayServer::WindowID window_id_over = DisplayServer::get_singleton()->get_window_at_screen_position(mouse_position);
if (window_id_over > 0 && window_id_over != window->get_window_id()) {
return;
}
@ -380,8 +375,8 @@ void EmbeddedProcess::_check_mouse_over() {
// Check if there's an exclusive popup, an open menu, or a tooltip.
// We don't want to grab focus to prevent the game window from coming to the front of the modal window
// or the open menu from closing when the mouse cursor moves outside the menu and over the embedded game.
Vector<DisplayServerEnums::WindowID> wl = DisplayServer::get_singleton()->get_window_list();
for (const DisplayServerEnums::WindowID &window_id : wl) {
Vector<DisplayServer::WindowID> wl = DisplayServer::get_singleton()->get_window_list();
for (const DisplayServer::WindowID &window_id : wl) {
Window *w = Window::get_from_id(window_id);
if (w && (w->is_exclusive() || w->get_flag(Window::FLAG_POPUP))) {
return;
@ -396,7 +391,7 @@ void EmbeddedProcess::_check_mouse_over() {
}
void EmbeddedProcess::_check_focused_process_id() {
ProcessID process_id = DisplayServer::get_singleton()->get_focused_process_id();
OS::ProcessID process_id = DisplayServer::get_singleton()->get_focused_process_id();
if (process_id != focused_process_id) {
focused_process_id = process_id;
if (focused_process_id == current_process_id) {
@ -431,8 +426,8 @@ void EmbeddedProcess::_check_focused_process_id() {
}
Window *EmbeddedProcess::_get_current_modal_window() {
Vector<DisplayServerEnums::WindowID> wl = DisplayServer::get_singleton()->get_window_list();
for (const DisplayServerEnums::WindowID &window_id : wl) {
Vector<DisplayServer::WindowID> wl = DisplayServer::get_singleton()->get_window_list();
for (const DisplayServer::WindowID &window_id : wl) {
Window *w = Window::get_from_id(window_id);
if (!w) {
continue;
@ -445,7 +440,8 @@ Window *EmbeddedProcess::_get_current_modal_window() {
return nullptr;
}
EmbeddedProcess::EmbeddedProcess() {
EmbeddedProcess::EmbeddedProcess() :
EmbeddedProcessBase() {
timer_embedding = memnew(Timer);
timer_embedding->set_wait_time(0.1);
timer_embedding->set_one_shot(true);