diff options
Diffstat (limited to 'yapp')
-rw-r--r-- | yapp/message_pump.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/yapp/message_pump.cpp b/yapp/message_pump.cpp index c2483d3..f3c8faf 100644 --- a/yapp/message_pump.cpp +++ b/yapp/message_pump.cpp @@ -20,11 +20,14 @@ bool is_full_screen() { int h = GetSystemMetrics(SM_CYSCREEN);
// use ClientRect instead of WindowRect so that it works normally for maximized applications - thx Nikto
RECT ClientRect;
- HWND hWnd = 0;
+ HWND hWnd;
+
+ HWND hWndDesktop = GetDesktopWindow();
+ HWND hWndShell = GetShellWindow();
// check foregroundwindow
hWnd = GetForegroundWindow();
- if(hWnd && hWnd != GetDesktopWindow() && hWnd != GetShellWindow()) {
+ if(hWnd && hWnd != hWndDesktop && hWnd != hWndShell) {
GetClientRect(hWnd, &ClientRect);
if ((ClientRect.right - ClientRect.left) >= w && (ClientRect.bottom - ClientRect.top) >= h)
return true;
@@ -32,13 +35,13 @@ bool is_full_screen() { // check other top level windows
while (hWnd = FindWindowEx(NULL, hWnd, NULL, NULL)) {
- if(IsWindowVisible(hWnd) == 0 || IsIconic(hWnd) || hWnd == GetDesktopWindow() || hWnd == GetShellWindow())
+ if(IsWindowVisible(hWnd) == 0 || IsIconic(hWnd) || hWnd == hWndDesktop || hWnd == hWndShell)
continue;
- if(DBGetContactSettingByte(0, MODULE, "ShowForNonTopmostFullscreenWindows", 0) == 1) {
+// if(DBGetContactSettingByte(0, MODULE, "ShowForNonTopmostFullscreenWindows", 0) == 1) {
if (!(GetWindowLong(hWnd, GWL_EXSTYLE) & WS_EX_TOPMOST))
continue;
- }
+// }
// not sure if this could be done more simply using 'IsZoomed'?
GetClientRect(hWnd, &ClientRect);
|