From 5c355a63d3a86039a8f1a88e6ea508209de97dbc Mon Sep 17 00:00:00 2001 From: George Marques Date: Tue, 5 Jul 2016 12:29:08 -0300 Subject: Add OS.request_attention() for Windows --- platform/windows/os_windows.cpp | 11 +++++++++++ platform/windows/os_windows.h | 1 + 2 files changed, 12 insertions(+) (limited to 'platform/windows') 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(); -- cgit v1.2.3