diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-05-23 08:13:26 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-05-23 08:13:26 +0000 |
commit | e1019b5bb58834b96ec02096f4ad57ce77431ffa (patch) | |
tree | 24b5e8b22385686551af131f203023e7a4ab5735 /yapp/message_pump.cpp | |
parent | ce7ed8b5d95e707528bc44b2b0276559e4d21910 (diff) |
fix for full-screen detection patch
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@182 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'yapp/message_pump.cpp')
-rw-r--r-- | yapp/message_pump.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
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)
|