aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRémi Verschelde2016-10-03 11:36:01 +0200
committerGitHub2016-10-03 11:36:01 +0200
commit90f4e76a463713826b81a768444ce318dcdb3aa0 (patch)
treede75c67730505a1f69a5cc885cc136fd7c0a505b /core
parentcf4693cf18ec6ccdd3ccb4e416d3520efbf26010 (diff)
parent66dac878ac9fc278044281b7f67fbed668e4523d (diff)
downloadgodot-90f4e76a463713826b81a768444ce318dcdb3aa0.tar.gz
godot-90f4e76a463713826b81a768444ce318dcdb3aa0.tar.zst
godot-90f4e76a463713826b81a768444ce318dcdb3aa0.zip
Diffstat (limited to 'core')
-rw-r--r--core/os/os.h1
-rw-r--r--core/script_debugger_remote.cpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/core/os/os.h b/core/os/os.h
index 8e9293b3c..c2b46a542 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -372,6 +372,7 @@ public:
virtual void set_screen_orientation(ScreenOrientation p_orientation);
ScreenOrientation get_screen_orientation() const;
+ virtual void enable_for_stealing_focus(ProcessID pid) {}
virtual void move_window_to_foreground() {}
virtual void debug_break();
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp
index 1ac090796..6d685d3c4 100644
--- a/core/script_debugger_remote.cpp
+++ b/core/script_debugger_remote.cpp
@@ -134,6 +134,8 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script,bool p_can_continue) {
ERR_FAIL();
}
+ OS::get_singleton()->enable_for_stealing_focus(Globals::get_singleton()->get("editor_pid"));
+
packet_peer_stream->put_var("debug_enter");
packet_peer_stream->put_var(2);
packet_peer_stream->put_var(p_can_continue);
@@ -273,6 +275,7 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script,bool p_can_continue) {
set_depth(-1);
set_lines_left(-1);
+ OS::get_singleton()->move_window_to_foreground();
break;
} else if (command=="break") {
ERR_PRINT("Got break when already broke!");