mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 17:14:41 +00:00
[NTUSER] Correctly store original unsnap position (#7244)
A small change before PR #5705 was merged caused a severe downgrade in the snap/unsnap handling. Win key handling should work correctly now. CORE-19165 CORE-19166
This commit is contained in:
parent
7ede534910
commit
82a45262bf
2 changed files with 4 additions and 4 deletions
|
@ -3937,7 +3937,7 @@ co_IntSnapWindow(PWND Wnd, UINT Edge)
|
|||
co_IntSendMessage(UserHMGetHandle(Wnd), WM_SYSCOMMAND, SC_MAXIMIZE, 0);
|
||||
return;
|
||||
}
|
||||
else if (Edge)
|
||||
else if (Edge != HTNOWHERE)
|
||||
{
|
||||
UserRefObjectCo(Wnd, &ref);
|
||||
hasRef = TRUE;
|
||||
|
@ -3951,7 +3951,7 @@ co_IntSnapWindow(PWND Wnd, UINT Edge)
|
|||
IntSetSnapEdge(Wnd, HTNOWHERE);
|
||||
return;
|
||||
}
|
||||
newPos = Wnd->InternalPos.NormalRect;
|
||||
newPos = Wnd->InternalPos.NormalRect; /* Copy RECT now before it is lost */
|
||||
IntSetSnapInfo(Wnd, HTNOWHERE, NULL);
|
||||
}
|
||||
else
|
||||
|
@ -4000,7 +4000,7 @@ IntSetSnapInfo(PWND Wnd, UINT Edge, IN const RECT *Pos OPTIONAL)
|
|||
{
|
||||
RECT r;
|
||||
IntSetSnapEdge(Wnd, Edge);
|
||||
if (Edge != HTNOWHERE)
|
||||
if (Edge == HTNOWHERE)
|
||||
{
|
||||
RECTL_vSetEmptyRect(&r);
|
||||
Pos = (Wnd->style & WS_MINIMIZE) ? NULL : &r;
|
||||
|
|
|
@ -81,7 +81,7 @@ VOID FASTCALL IntSetSnapInfo(PWND Wnd, UINT Edge, IN const RECT *Pos OPTIONAL);
|
|||
FORCEINLINE VOID
|
||||
co_IntUnsnapWindow(PWND Wnd)
|
||||
{
|
||||
co_IntSnapWindow(Wnd, 0);
|
||||
co_IntSnapWindow(Wnd, HTNOWHERE);
|
||||
}
|
||||
|
||||
FORCEINLINE BOOLEAN
|
||||
|
|
Loading…
Reference in a new issue