summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorJuan Linietsky <juan@godotengine.org>2019-02-23 12:09:35 -0300
committerJuan Linietsky <juan@godotengine.org>2019-02-23 12:09:35 -0300
commit9d78274e068d4928044220c4d5c1a7baed423670 (patch)
treee6d192e20d1aa2d07b0ba5347c68bb31f6d9f579 /main
parentb2f8dd0d55346dbf5b5b6ae8737164435a8f8de0 (diff)
Make allowed pid for window takeover happen immediately, fixes #21431
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp
index ee13a4bacc..b52e03add3 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -788,7 +788,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
memdelete(sdr);
} else {
script_debugger = sdr;
- sdr->set_allow_focus_steal_pid(allow_focus_steal_pid);
}
} else if (debug_mode == "local") {
@@ -1129,6 +1128,10 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
OS::get_singleton()->set_window_always_on_top(true);
}
+ if (allow_focus_steal_pid) {
+ OS::get_singleton()->enable_for_stealing_focus(allow_focus_steal_pid);
+ }
+
register_server_types();
MAIN_PRINT("Main: Load Remaps");