diff options
-rw-r--r-- | yapp/message_pump.cpp | 15 | ||||
-rw-r--r-- | yapp/version.h | 2 |
2 files changed, 9 insertions, 8 deletions
diff --git a/yapp/message_pump.cpp b/yapp/message_pump.cpp index 767ac2c..93d783a 100644 --- a/yapp/message_pump.cpp +++ b/yapp/message_pump.cpp @@ -18,13 +18,14 @@ HANDLE hMPEvent; bool is_full_screen() {
int w = GetSystemMetrics(SM_CXSCREEN);
int h = GetSystemMetrics(SM_CYSCREEN);
- RECT WindowRect;
+ // use ClientRect instead of WindowRect so that it works normally for maximized applications - thx Nickto
+ RECT ClientRect;
HWND hWnd = 0;
// check foregroundwindow
hWnd = GetForegroundWindow();
- GetWindowRect(hWnd, &WindowRect);
- if ((WindowRect.right - WindowRect.left) >= w && (WindowRect.bottom - WindowRect.top) >= h)
+ GetClientRect(hWnd, &ClientRect);
+ if ((ClientRect.right - ClientRect.left) >= w && (ClientRect.bottom - ClientRect.top) >= h)
return true;
// check other top level windows
@@ -32,12 +33,12 @@ bool is_full_screen() { if(!IsWindowVisible(hWnd) || IsIconic(hWnd) || GetDesktopWindow() == hWnd)
continue;
- if (!(GetWindowLong(hWnd, GWL_EXSTYLE) & WS_EX_TOPMOST))
- continue;
+ //if (!(GetWindowLong(hWnd, GWL_EXSTYLE) & WS_EX_TOPMOST))
+ //continue;
// not sure if this could be done more simply using 'IsZoomed'?
- GetWindowRect(hWnd, &WindowRect);
- if ((WindowRect.right - WindowRect.left) < w || (WindowRect.bottom - WindowRect.top) < h)
+ GetClientRect(hWnd, &ClientRect);
+ if ((ClientRect.right - ClientRect.left) < w || (ClientRect.bottom - ClientRect.top) < h)
continue;
return true;
diff --git a/yapp/version.h b/yapp/version.h index 327ebcb..ea39f5e 100644 --- a/yapp/version.h +++ b/yapp/version.h @@ -4,7 +4,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 3
#define __RELEASE_NUM 0
-#define __BUILD_NUM 2
+#define __BUILD_NUM 3
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
|