diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2016-09-14 04:02:18 +0200 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2016-09-14 04:02:18 +0200 |
commit | 66dac878ac9fc278044281b7f67fbed668e4523d (patch) | |
tree | 2f1b099566a50eb624215a14ff837ed2f828fc59 /platform | |
parent | 6f7b2d277fc068264b72b0a39d464da03807c628 (diff) |
Improve debug focus behavior
Fix focusing debugged game on Windows
Add re-focusing editor on continue
Diffstat (limited to 'platform')
-rw-r--r-- | platform/windows/os_windows.cpp | 7 | ||||
-rw-r--r-- | platform/windows/os_windows.h | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index cebafdabce..a3ac12a838 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -2154,10 +2154,15 @@ String OS_Windows::get_stdin_string(bool p_block) { } +void OS_Windows::enable_for_stealing_focus(ProcessID pid) { + + AllowSetForegroundWindow(pid); + +} + void OS_Windows::move_window_to_foreground() { SetForegroundWindow(hWnd); - BringWindowToTop(hWnd); } diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index e3e037e57b..70ef694957 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -269,6 +269,7 @@ public: virtual String get_locale() const; virtual LatinKeyboardVariant get_latin_keyboard_variant() const; + virtual void enable_for_stealing_focus(ProcessID pid); virtual void move_window_to_foreground(); virtual String get_data_dir() const; virtual String get_system_dir(SystemDir p_dir) const; |