"minimize all": only minimize windows with valid positions

svn path=/trunk/; revision=14448
This commit is contained in:
Martin Fuchs 2005-04-02 16:18:09 +00:00
parent fccdd32ffd
commit 275c59c4d4

View file

@ -155,8 +155,8 @@ static BOOL CALLBACK SwitchDesktopEnumFct(HWND hwnd, LPARAM lparam)
{ {
WindowSet& windows = *(WindowSet*)lparam; 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); windows.insert(hwnd);
return TRUE; return TRUE;
@ -212,12 +212,17 @@ static BOOL CALLBACK MinimizeDesktopEnumFct(HWND hwnd, LPARAM lparam)
{ {
list<MinimizeStruct>& minimized = *(list<MinimizeStruct>*)lparam; list<MinimizeStruct>& minimized = *(list<MinimizeStruct>*)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) && !IsIconic(hwnd)) {
if (!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))); minimized.push_back(MinimizeStruct(hwnd, GetWindowStyle(hwnd)));
ShowWindowAsync(hwnd, SW_MINIMIZE); ShowWindowAsync(hwnd, SW_MINIMIZE);
} }
}
return TRUE; return TRUE;
} }