summaryrefslogtreecommitdiff
path: root/yapp
diff options
context:
space:
mode:
authorsje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-06-05 06:05:07 +0000
committersje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-06-05 06:05:07 +0000
commite81e7feec300383661beaebf757366d02f094062 (patch)
tree85a8a1a542d4aae505b20ab8a7ebcf0346d69650 /yapp
parentb3861e72ec527e73bcbb44978e531f5731237c0c (diff)
another fix for full-screen detection (do not accept GetShellWindow (program manager) as full-screen app)
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@200 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'yapp')
-rw-r--r--yapp/YAPP.mdsp6
-rw-r--r--yapp/message_pump.cpp29
-rw-r--r--yapp/version.h2
3 files changed, 28 insertions, 9 deletions
diff --git a/yapp/YAPP.mdsp b/yapp/YAPP.mdsp
index be85244..6267bd4 100644
--- a/yapp/YAPP.mdsp
+++ b/yapp/YAPP.mdsp
@@ -110,7 +110,7 @@ extraResourceOptions=
1=popups2.rc
2=version.rc
[History]
-version.h,891
+version.h,150
..\..\include\newpluginapi.h,1183
..\..\include\m_plugins.h,0
popups2.cpp,1500
@@ -118,7 +118,7 @@ popups2.rc,830
resource.h,2162
version.rc,24
resource.rc,23
-popwin.cpp,583
popup_history.cpp,2330
common.h,2374
-message_pump.cpp,722
+message_pump.cpp,1156
+popwin.cpp,583
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;
}
diff --git a/yapp/version.h b/yapp/version.h
index 07ee79f..4531f90 100644
--- a/yapp/version.h
+++ b/yapp/version.h
@@ -4,7 +4,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 3
#define __RELEASE_NUM 1
-#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