mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 01:24:38 +00:00
"minimize all": only minimize windows with valid positions
svn path=/trunk/; revision=14448
This commit is contained in:
parent
fccdd32ffd
commit
275c59c4d4
1 changed files with 10 additions and 5 deletions
|
@ -155,8 +155,8 @@ static BOOL CALLBACK SwitchDesktopEnumFct(HWND hwnd, LPARAM 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);
|
||||
|
||||
return TRUE;
|
||||
|
@ -212,12 +212,17 @@ static BOOL CALLBACK MinimizeDesktopEnumFct(HWND hwnd, LPARAM lparam)
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue