https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3b496432a8e84ccf54e448b24aad33fc752fe7a7
commit 3b496432a8e84ccf54e448b24aad33fc752fe7a7 Author: Jose Carlos Jesus <zecarlos1...@hotmail.com> AuthorDate: Fri Apr 29 13:00:52 2022 +0100 Commit: GitHub <nore...@github.com> CommitDate: Fri Apr 29 15:00:52 2022 +0300 [NEWDEV] Fix Update Driver wizard dialog position (#4274) The Update Driver wizard dialog was not completely visible. A part of the window was off the screen. As in Windows XP the dialog box is positioned slightly below and to the right of the parent window (Z-order). --- dll/win32/newdev/wizard.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dll/win32/newdev/wizard.c b/dll/win32/newdev/wizard.c index 533624607bb..28e3053356b 100644 --- a/dll/win32/newdev/wizard.c +++ b/dll/win32/newdev/wizard.c @@ -1,7 +1,7 @@ /* * New device installer (newdev.dll) * - * Copyright 2006 Herv� Poussineau (hpous...@reactos.org) + * Copyright 2006 Hervé Poussineau (hpous...@reactos.org) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -42,6 +42,13 @@ CenterWindow( GetWindowRect(hWndParent, &rcParent); GetWindowRect(hWnd, &rcWindow); + /* Check if the child window fits inside the parent window */ + if (rcWindow.left < rcParent.left || rcWindow.top < rcParent.top || + rcWindow.right > rcParent.right || rcWindow.bottom > rcParent.bottom) + { + return; + } + SetWindowPos( hWnd, HWND_TOP,