Make allowed pid for window takeover happen immediately, fixes #21431
This commit is contained in:
parent
b2f8dd0d55
commit
9d78274e06
3 changed files with 4 additions and 13 deletions
|
@ -139,10 +139,6 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script, bool p_can_continue)
|
||||||
ERR_FAIL();
|
ERR_FAIL();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allow_focus_steal_pid) {
|
|
||||||
OS::get_singleton()->enable_for_stealing_focus(allow_focus_steal_pid);
|
|
||||||
}
|
|
||||||
|
|
||||||
packet_peer_stream->put_var("debug_enter");
|
packet_peer_stream->put_var("debug_enter");
|
||||||
packet_peer_stream->put_var(2);
|
packet_peer_stream->put_var(2);
|
||||||
packet_peer_stream->put_var(p_can_continue);
|
packet_peer_stream->put_var(p_can_continue);
|
||||||
|
@ -1058,9 +1054,6 @@ void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p
|
||||||
physics_frame_time = p_physics_frame_time;
|
physics_frame_time = p_physics_frame_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptDebuggerRemote::set_allow_focus_steal_pid(OS::ProcessID p_pid) {
|
|
||||||
allow_focus_steal_pid = p_pid;
|
|
||||||
}
|
|
||||||
|
|
||||||
ScriptDebuggerRemote::ResourceUsageFunc ScriptDebuggerRemote::resource_usage_func = NULL;
|
ScriptDebuggerRemote::ResourceUsageFunc ScriptDebuggerRemote::resource_usage_func = NULL;
|
||||||
|
|
||||||
|
@ -1083,7 +1076,6 @@ ScriptDebuggerRemote::ScriptDebuggerRemote() :
|
||||||
char_count(0),
|
char_count(0),
|
||||||
last_msec(0),
|
last_msec(0),
|
||||||
msec_count(0),
|
msec_count(0),
|
||||||
allow_focus_steal_pid(0),
|
|
||||||
locking(false),
|
locking(false),
|
||||||
poll_every(0),
|
poll_every(0),
|
||||||
request_scene_tree(NULL),
|
request_scene_tree(NULL),
|
||||||
|
|
|
@ -99,8 +99,6 @@ class ScriptDebuggerRemote : public ScriptDebugger {
|
||||||
uint64_t last_msec;
|
uint64_t last_msec;
|
||||||
uint64_t msec_count;
|
uint64_t msec_count;
|
||||||
|
|
||||||
OS::ProcessID allow_focus_steal_pid;
|
|
||||||
|
|
||||||
bool locking; //hack to avoid a deadloop
|
bool locking; //hack to avoid a deadloop
|
||||||
static void _print_handler(void *p_this, const String &p_string, bool p_error);
|
static void _print_handler(void *p_this, const String &p_string, bool p_error);
|
||||||
|
|
||||||
|
@ -174,8 +172,6 @@ public:
|
||||||
virtual void profiling_end();
|
virtual void profiling_end();
|
||||||
virtual void profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time);
|
virtual void profiling_set_frame_times(float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time);
|
||||||
|
|
||||||
void set_allow_focus_steal_pid(OS::ProcessID p_pid);
|
|
||||||
|
|
||||||
ScriptDebuggerRemote();
|
ScriptDebuggerRemote();
|
||||||
~ScriptDebuggerRemote();
|
~ScriptDebuggerRemote();
|
||||||
};
|
};
|
||||||
|
|
|
@ -788,7 +788,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||||
memdelete(sdr);
|
memdelete(sdr);
|
||||||
} else {
|
} else {
|
||||||
script_debugger = sdr;
|
script_debugger = sdr;
|
||||||
sdr->set_allow_focus_steal_pid(allow_focus_steal_pid);
|
|
||||||
}
|
}
|
||||||
} else if (debug_mode == "local") {
|
} 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);
|
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();
|
register_server_types();
|
||||||
|
|
||||||
MAIN_PRINT("Main: Load Remaps");
|
MAIN_PRINT("Main: Load Remaps");
|
||||||
|
|
Loading…
Reference in a new issue