Permalink
Browse files

[WIN32] fixed: enable system screensaver when loosing focus (closes #…

…13180)
  • Loading branch information...
1 parent 7d928ac commit a6ca119240326c9a8a27c5f1baf654f475703dd2 @wsoltys wsoltys committed Jul 21, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 xbmc/windowing/windows/WinEventsWin32.cpp
@@ -439,6 +439,16 @@ LRESULT CALLBACK CWinEventsWin32::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
if (CWIN32Util::GetFocussedProcess(procfile))
CLog::Log(LOGDEBUG, __FUNCTION__": Focus switched to process %s", procfile.c_str());
}
+ if(GetForegroundWindow() == hWnd)
+ {
+ CLog::Log(LOGDEBUG, __FUNCTION__": Got Focus, deactivating system screensaver");
+ g_Windowing.EnableSystemScreenSaver(false);
+ }
+ else
+ {
+ CLog::Log(LOGDEBUG, __FUNCTION__": Lost Focus, activating system screensaver");
+ g_Windowing.EnableSystemScreenSaver(true);
+ }
break;
case WM_SYSKEYDOWN:
switch (wParam)

0 comments on commit a6ca119

Please sign in to comment.