diff options
author | Bartosz Taudul <wolf@nereid.pl> | 2022-10-13 21:44:31 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf@nereid.pl> | 2022-10-13 21:44:31 +0300 |
commit | d0968844d8e5cf2a5ace6a43bdc040ecced30056 (patch) | |
tree | 0dff0b9779ec0049f4eb3ebf8875c2a7ab1a0b5d | |
parent | b66c3a0e3079d0de1ff9988ecdcf1650710945ba (diff) |
Only request attention if window has no focus.
-rw-r--r-- | profiler/src/BackendGlfw.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/profiler/src/BackendGlfw.cpp b/profiler/src/BackendGlfw.cpp index f9330bca..cd6b25fa 100644 --- a/profiler/src/BackendGlfw.cpp +++ b/profiler/src/BackendGlfw.cpp @@ -153,7 +153,10 @@ void Backend::Run() void Backend::Attention() { - glfwRequestWindowAttention( s_window ); + if( !glfwGetWindowAttrib( s_window, GLFW_FOCUSED ) ) + { + glfwRequestWindowAttention( s_window ); + } } void Backend::NewFrame( int& w, int& h ) |