1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

-Restore mouse on X11 when debugger break happens, closes #2232

This commit is contained in:
Juan Linietsky
2016-01-02 12:58:59 -03:00
parent 9ed3d6d007
commit 757b8c4206
2 changed files with 11 additions and 4 deletions

View File

@@ -30,7 +30,7 @@
#include "os/os.h"
#include "io/ip.h"
#include "globals.h"
#include "os/input.h"
void ScriptDebuggerRemote::_send_video_memory() {
List<ResourceUsage> usage;
@@ -135,6 +135,10 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script,bool p_can_continue) {
packet_peer_stream->put_var(p_can_continue);
packet_peer_stream->put_var(p_script->debug_get_error());
Input::MouseMode mouse_mode=Input::get_singleton()->get_mouse_mode();
if (mouse_mode!=Input::MOUSE_MODE_VISIBLE)
Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
while(true) {
@@ -296,6 +300,9 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script,bool p_can_continue) {
packet_peer_stream->put_var("debug_exit");
packet_peer_stream->put_var(0);
if (mouse_mode!=Input::MOUSE_MODE_VISIBLE)
Input::get_singleton()->set_mouse_mode(mouse_mode);
}