diff options
author | George Marques <george@gmarqu.es> | 2016-07-05 12:29:08 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2016-07-05 12:29:08 -0300 |
commit | 5c355a63d3a86039a8f1a88e6ea508209de97dbc (patch) | |
tree | 4d016a52dbccaad9e55bf5e3b1a5fd0bec909239 /platform/windows | |
parent | 628b0a9375814bc811820f073df5f102bdb049fc (diff) |
Add OS.request_attention() for Windows
Diffstat (limited to 'platform/windows')
-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 89de969cff..eee03b8dc1 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 d2249bf352..388cc6c37d 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(); |