diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2016-07-21 17:29:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-21 17:29:45 +0200 |
commit | d723e5a62ff10d338b8a2848e5a7a43a81233c24 (patch) | |
tree | 96b4aac1dc2795ecb49ecf0c149be43890794e1e /platform | |
parent | 4abc945466c69426cf4c00ab87d61b927ef1639d (diff) | |
parent | 5c355a63d3a86039a8f1a88e6ea508209de97dbc (diff) |
Merge pull request #5560 from vnen/os-request-attention
Add OS.request_attention() for Windows
Diffstat (limited to 'platform')
-rw-r--r-- | platform/windows/os_windows.cpp | 11 | ||||
-rw-r--r-- | platform/windows/os_windows.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index b0a50ca4b8..c73e66f2b2 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1683,6 +1683,17 @@ bool OS_Windows::get_borderless_window() { return video_mode.borderless_window; } +void OS_Windows::request_attention() { + + FLASHWINFO info; + info.cbSize = sizeof(FLASHWINFO); + info.hwnd = hWnd; + info.dwFlags = FLASHW_TRAY; + info.dwTimeout = 0; + info.uCount = 2; + FlashWindowEx(&info); +} + void OS_Windows::print_error(const char* p_function, const char* p_file, int p_line, const char* p_code, const char* p_rationale, ErrorType p_type) { HANDLE hCon = GetStdHandle(STD_OUTPUT_HANDLE); diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index 5acb300c0f..e3e037e57b 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -230,6 +230,7 @@ public: virtual bool is_window_minimized() const; virtual void set_window_maximized(bool p_enabled); virtual bool is_window_maximized() const; + virtual void request_attention(); virtual void set_borderless_window(int p_borderless); virtual bool get_borderless_window(); |