From e1019b5bb58834b96ec02096f4ad57ce77431ffa Mon Sep 17 00:00:00 2001 From: sje Date: Wed, 23 May 2007 08:13:26 +0000 Subject: fix for full-screen detection patch git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@182 4f64403b-2f21-0410-a795-97e2b3489a10 --- yapp/message_pump.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'yapp/message_pump.cpp') diff --git a/yapp/message_pump.cpp b/yapp/message_pump.cpp index 93d783a..3e0349d 100644 --- a/yapp/message_pump.cpp +++ b/yapp/message_pump.cpp @@ -24,10 +24,12 @@ bool is_full_screen() { // check foregroundwindow hWnd = GetForegroundWindow(); - GetClientRect(hWnd, &ClientRect); - if ((ClientRect.right - ClientRect.left) >= w && (ClientRect.bottom - ClientRect.top) >= h) - return true; - + if(hWnd && hWnd != GetDesktopWindow()) { + GetClientRect(hWnd, &ClientRect); + if ((ClientRect.right - ClientRect.left) >= w && (ClientRect.bottom - ClientRect.top) >= h) + return true; + } + // check other top level windows while (hWnd = FindWindowEx(NULL, hWnd, NULL, NULL)) { if(!IsWindowVisible(hWnd) || IsIconic(hWnd) || GetDesktopWindow() == hWnd) -- cgit v1.2.3