summaryrefslogtreecommitdiff
path: root/yapp/message_pump.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'yapp/message_pump.cpp')
-rw-r--r--yapp/message_pump.cpp29
1 files changed, 24 insertions, 5 deletions
diff --git a/yapp/message_pump.cpp b/yapp/message_pump.cpp
index 277e715..19d36e6 100644
--- a/yapp/message_pump.cpp
+++ b/yapp/message_pump.cpp
@@ -24,25 +24,44 @@ bool is_full_screen() {
// check foregroundwindow
hWnd = GetForegroundWindow();
- if(hWnd && hWnd != GetDesktopWindow()) {
+ if(hWnd && hWnd != GetDesktopWindow() && hWnd != GetShellWindow()) {
GetClientRect(hWnd, &ClientRect);
- if ((ClientRect.right - ClientRect.left) >= w && (ClientRect.bottom - ClientRect.top) >= h)
+ if ((ClientRect.right - ClientRect.left) >= w && (ClientRect.bottom - ClientRect.top) >= h) {
+ /*
+ {
+ TCHAR buf[512];
+ if(GetWindowText(hWnd, buf, 512))
+ PUShowMessageW(buf, SM_NOTIFY);
+ else
+ PUShowMessage("no title", SM_NOTIFY);
+ }
+ */
return true;
+ }
}
// check other top level windows
while (hWnd = FindWindowEx(NULL, hWnd, NULL, NULL)) {
- if(!IsWindowVisible(hWnd) || IsIconic(hWnd) || GetDesktopWindow() == hWnd)
+ if(IsWindowVisible(hWnd) == 0 || IsIconic(hWnd) || hWnd == GetDesktopWindow() || hWnd == GetShellWindow())
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'?
GetClientRect(hWnd, &ClientRect);
if ((ClientRect.right - ClientRect.left) < w || (ClientRect.bottom - ClientRect.top) < h)
continue;
+ /*
+ {
+ TCHAR buf[512];
+ if(GetWindowText(hWnd, buf, 512))
+ PUShowMessageW(buf, SM_NOTIFY);
+ else
+ PUShowMessage("no title", SM_NOTIFY);
+ }
+ */
return true;
}