public static WindowIsNotHung ( |
||
hWnd | ||
return | bool |
void ILayout.WindowCreated(Window window) { if (workspace.IsWorkspaceVisible || window.WorkspacesCount == 1) { if (NativeMethods.IsZoomed(window.hWnd) && Utilities.WindowIsNotHung(window)) { // restore if maximized - should not use SW_RESTORE as it activates the window NativeMethods.ShowWindow(window.hWnd, NativeMethods.SW.SW_SHOWNOACTIVATE); System.Threading.Thread.Sleep(NativeMethods.minimizeRestoreDelay); } if (workspace.IsWorkspaceVisible) { Reposition(); } } }
void ILayout.Reposition() { // restore any maximized windows - should not use SW_RESTORE as it activates the window var hasMaximized = false; foreach (var window in workspace.GetLayoutManagedWindows(). Where(w => NativeMethods.IsZoomed(w.hWnd) && Utilities.WindowIsNotHung(w))) { hasMaximized = true; NativeMethods.ShowWindow(window.hWnd, NativeMethods.SW.SW_SHOWNOACTIVATE); } if (hasMaximized) { System.Threading.Thread.Sleep(NativeMethods.minimizeRestoreDelay); } this.windows = workspace.GetLayoutManagedWindows(); Reposition(); }