1355 zoom ? " zoomed" : "");
1356
1357 if (::IsWindowVisible(hwnd)) {
1358 BOOL focusable = f->IsFocusableWindow();
1359
1360 WINDOWPLACEMENT wp;
1361 ::ZeroMemory(&wp, sizeof(wp));
1362 wp.length = sizeof(wp);
1363 ::GetWindowPlacement(hwnd, &wp);
1364
1365 // Iconify first.
1366 // If both iconify & zoom are TRUE, handle this case
1367 // with wp.flags field below.
1368 if (iconify) {
1369 wp.showCmd = focusable ? SW_MINIMIZE : SW_SHOWMINNOACTIVE;
1370 } else if (zoom) {
1371 wp.showCmd = focusable ? SW_SHOWMAXIMIZED : SW_MAXIMIZE;
1372 } else { // zoom == iconify == FALSE
1373 wp.showCmd = focusable ? SW_RESTORE : SW_SHOWNOACTIVATE;
1374 }
1375
1376 if (zoom && iconify) {
1377 wp.flags |= WPF_RESTORETOMAXIMIZED;
1378 } else {
1379 wp.flags &= ~WPF_RESTORETOMAXIMIZED;
1380 }
1381
1382 if (!zoom) {
1383 f->m_forceResetZoomed = TRUE;
1384 }
1385
1386 // The SetWindowPlacement() causes the WmSize() invocation
1387 // which, in turn, actually updates the m_iconic & m_zoomed flags
1388 // as well as sends Java event (WINDOW_STATE_CHANGED.)
1389 ::SetWindowPlacement(hwnd, &wp);
1390
1391 f->m_forceResetZoomed = FALSE;
1392 } else {
1393 DTRACE_PRINTLN(" not visible, just recording the requested state");
1394
1395 f->setIconic(iconify);
|
1355 zoom ? " zoomed" : "");
1356
1357 if (::IsWindowVisible(hwnd)) {
1358 BOOL focusable = f->IsFocusableWindow();
1359
1360 WINDOWPLACEMENT wp;
1361 ::ZeroMemory(&wp, sizeof(wp));
1362 wp.length = sizeof(wp);
1363 ::GetWindowPlacement(hwnd, &wp);
1364
1365 // Iconify first.
1366 // If both iconify & zoom are TRUE, handle this case
1367 // with wp.flags field below.
1368 if (iconify) {
1369 wp.showCmd = focusable ? SW_MINIMIZE : SW_SHOWMINNOACTIVE;
1370 } else if (zoom) {
1371 wp.showCmd = focusable ? SW_SHOWMAXIMIZED : SW_MAXIMIZE;
1372 } else { // zoom == iconify == FALSE
1373 wp.showCmd = focusable ? SW_RESTORE : SW_SHOWNOACTIVATE;
1374 }
1375 ::ShowWindow(hwnd, wp.showCmd);
1376 if (zoom && iconify) {
1377 wp.flags |= WPF_RESTORETOMAXIMIZED;
1378 } else {
1379 wp.flags &= ~WPF_RESTORETOMAXIMIZED;
1380 }
1381
1382 if (!zoom) {
1383 f->m_forceResetZoomed = TRUE;
1384 }
1385
1386 // The SetWindowPlacement() causes the WmSize() invocation
1387 // which, in turn, actually updates the m_iconic & m_zoomed flags
1388 // as well as sends Java event (WINDOW_STATE_CHANGED.)
1389 ::SetWindowPlacement(hwnd, &wp);
1390
1391 f->m_forceResetZoomed = FALSE;
1392 } else {
1393 DTRACE_PRINTLN(" not visible, just recording the requested state");
1394
1395 f->setIconic(iconify);
|