mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 09:50:07 +00:00
[EXPLORER] Restore minimized windows with the correct position (#5488)
Stop storing and setting window positions from the taskbar and rely
on the window's existing position instead. Partial revert of e6bced7a35
.
Windows are now correctly positioned when being restored from the taskbar.
This also fixes an issue where minimizing and opening Task Manager causes
the window to become blank when running our shell in Windows Server 2003.
CORE-19055 CORE-13895 CORE-18350
This commit is contained in:
parent
8f3a09722e
commit
4511e62b10
|
@ -82,7 +82,6 @@ typedef struct _TASK_ITEM
|
|||
PTASK_GROUP Group;
|
||||
INT Index;
|
||||
INT IconIndex;
|
||||
WINDOWPLACEMENT wndpl;
|
||||
|
||||
union
|
||||
{
|
||||
|
@ -1113,8 +1112,6 @@ public:
|
|||
TaskItem->hWnd = hWnd;
|
||||
TaskItem->Index = -1;
|
||||
TaskItem->Group = AddToTaskGroup(hWnd);
|
||||
TaskItem->wndpl.length = sizeof(TaskItem->wndpl);
|
||||
::GetWindowPlacement(hWnd, &TaskItem->wndpl);
|
||||
|
||||
if (!m_IsDestroying)
|
||||
{
|
||||
|
@ -1602,16 +1599,12 @@ public:
|
|||
|
||||
if (!bIsMinimized && bIsActive)
|
||||
{
|
||||
TaskItem->wndpl.length = sizeof(TaskItem->wndpl);
|
||||
::GetWindowPlacement(TaskItem->hWnd, &TaskItem->wndpl);
|
||||
|
||||
::ShowWindowAsync(TaskItem->hWnd, SW_MINIMIZE);
|
||||
TRACE("Valid button clicked. App window Minimized.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
::SwitchToThisWindow(TaskItem->hWnd, TRUE);
|
||||
::SetWindowPlacement(TaskItem->hWnd, &TaskItem->wndpl);
|
||||
|
||||
TRACE("Valid button clicked. App window Restored.\n");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue