"minimize all": only minimize windows with valid positions
Modified: trunk/reactos/subsys/system/explorer/desktop/desktop.cpp
_____
Modified: trunk/reactos/subsys/system/explorer/desktop/desktop.cpp
--- trunk/reactos/subsys/system/explorer/desktop/desktop.cpp
2005-04-02 16:17:08 UTC (rev 14447)
+++ trunk/reactos/subsys/system/explorer/desktop/desktop.cpp
2005-04-02 16:18:09 UTC (rev 14448)
@@ -155,8 +155,8 @@
{
WindowSet& windows = *(WindowSet*)lparam;
- if (IsWindowVisible(hwnd))
- if (hwnd!=g_Globals._hwndDesktopBar &&
hwnd!=g_Globals._hwndDesktop)
+ if (hwnd!=g_Globals._hwndDesktopBar &&
hwnd!=g_Globals._hwndDesktop)
+ if (IsWindowVisible(hwnd))
windows.insert(hwnd);
return TRUE;
@@ -212,12 +212,17 @@
{
list<MinimizeStruct>& minimized =
*(list<MinimizeStruct>*)lparam;
- if (IsWindowVisible(hwnd))
- if (hwnd!=g_Globals._hwndDesktopBar &&
hwnd!=g_Globals._hwndDesktop)
- if (!IsIconic(hwnd)) {
+ if (hwnd!=g_Globals._hwndDesktopBar &&
hwnd!=g_Globals._hwndDesktop)
+ if (IsWindowVisible(hwnd) && !IsIconic(hwnd)) {
+ RECT rect;
+
+ if (GetWindowRect(hwnd,&rect))
+ if (rect.right>0 && rect.bottom>0 &&
+ rect.right>rect.left &&
rect.bottom>rect.top) {
minimized.push_back(MinimizeStruct(hwnd,
GetWindowStyle(hwnd)));
ShowWindowAsync(hwnd, SW_MINIMIZE);
}
+ }
return TRUE;
}
Show replies by date