[WIN32K:NTUSER] Formatting only!

This commit is contained in:
Hermès Bélusca-Maïto 2018-07-08 02:23:52 +02:00
parent 9cab5b549d
commit 4d057cf626
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 39 additions and 38 deletions

View file

@ -854,32 +854,32 @@ IntIsChildWindow(PWND Parent, PWND BaseWindow)
} }
//// ////
/* /* Link the window into siblings list. Children and parent are kept in place. */
Link the window into siblings list
children and parent are kept in place.
*/
VOID FASTCALL VOID FASTCALL
IntLinkWindow( IntLinkWindow(
PWND Wnd, PWND Wnd,
PWND WndInsertAfter /* set to NULL if top sibling */ PWND WndInsertAfter /* Set to NULL if top sibling */
) )
{ {
if ((Wnd->spwndPrev = WndInsertAfter)) Wnd->spwndPrev = WndInsertAfter;
{ if (Wnd->spwndPrev)
/* link after WndInsertAfter */ {
if ((Wnd->spwndNext = WndInsertAfter->spwndNext)) /* Link after WndInsertAfter */
Wnd->spwndNext->spwndPrev = Wnd; Wnd->spwndNext = WndInsertAfter->spwndNext;
if (Wnd->spwndNext)
Wnd->spwndNext->spwndPrev = Wnd;
Wnd->spwndPrev->spwndNext = Wnd; Wnd->spwndPrev->spwndNext = Wnd;
} }
else else
{ {
/* link at top */ /* Link at the top */
if ((Wnd->spwndNext = Wnd->spwndParent->spwndChild)) Wnd->spwndNext = Wnd->spwndParent->spwndChild;
Wnd->spwndNext->spwndPrev = Wnd; if (Wnd->spwndNext)
Wnd->spwndNext->spwndPrev = Wnd;
Wnd->spwndParent->spwndChild = Wnd; Wnd->spwndParent->spwndChild = Wnd;
} }
} }
/* /*
@ -889,8 +889,8 @@ VOID FASTCALL IntLinkHwnd(PWND Wnd, HWND hWndPrev)
{ {
if (hWndPrev == HWND_NOTOPMOST) if (hWndPrev == HWND_NOTOPMOST)
{ {
if (!(Wnd->ExStyle & WS_EX_TOPMOST) && if (!(Wnd->ExStyle & WS_EX_TOPMOST) && (Wnd->ExStyle2 & WS_EX2_LINKED))
(Wnd->ExStyle2 & WS_EX2_LINKED)) return; /* nothing to do */ return; /* nothing to do */
Wnd->ExStyle &= ~WS_EX_TOPMOST; Wnd->ExStyle &= ~WS_EX_TOPMOST;
hWndPrev = HWND_TOP; /* fallback to the HWND_TOP case */ hWndPrev = HWND_TOP; /* fallback to the HWND_TOP case */
} }
@ -903,8 +903,10 @@ VOID FASTCALL IntLinkHwnd(PWND Wnd, HWND hWndPrev)
PWND WndInsertAfter; PWND WndInsertAfter;
WndInsertAfter = Wnd->spwndParent->spwndChild; WndInsertAfter = Wnd->spwndParent->spwndChild;
while( WndInsertAfter && WndInsertAfter->spwndNext) while (WndInsertAfter && WndInsertAfter->spwndNext)
{
WndInsertAfter = WndInsertAfter->spwndNext; WndInsertAfter = WndInsertAfter->spwndNext;
}
IntLinkWindow(Wnd, WndInsertAfter); IntLinkWindow(Wnd, WndInsertAfter);
Wnd->ExStyle &= ~WS_EX_TOPMOST; Wnd->ExStyle &= ~WS_EX_TOPMOST;
@ -913,7 +915,6 @@ VOID FASTCALL IntLinkHwnd(PWND Wnd, HWND hWndPrev)
{ {
/* Link in the top of the list */ /* Link in the top of the list */
IntLinkWindow(Wnd, NULL); IntLinkWindow(Wnd, NULL);
Wnd->ExStyle |= WS_EX_TOPMOST; Wnd->ExStyle |= WS_EX_TOPMOST;
} }
else if (hWndPrev == HWND_TOP) else if (hWndPrev == HWND_TOP)
@ -927,7 +928,9 @@ VOID FASTCALL IntLinkHwnd(PWND Wnd, HWND hWndPrev)
{ {
while (WndInsertBefore != NULL && WndInsertBefore->spwndNext != NULL) while (WndInsertBefore != NULL && WndInsertBefore->spwndNext != NULL)
{ {
if (!(WndInsertBefore->ExStyle & WS_EX_TOPMOST)) break; if (!(WndInsertBefore->ExStyle & WS_EX_TOPMOST))
break;
if (WndInsertBefore == Wnd->spwndOwner) /* keep it above owner */ if (WndInsertBefore == Wnd->spwndOwner) /* keep it above owner */
{ {
Wnd->ExStyle |= WS_EX_TOPMOST; Wnd->ExStyle |= WS_EX_TOPMOST;
@ -946,7 +949,7 @@ VOID FASTCALL IntLinkHwnd(PWND Wnd, HWND hWndPrev)
WndInsertAfter = UserGetWindowObject(hWndPrev); WndInsertAfter = UserGetWindowObject(hWndPrev);
/* Are we called with an erroneous handle */ /* Are we called with an erroneous handle */
if(WndInsertAfter == NULL) if (WndInsertAfter == NULL)
{ {
/* Link in a default position */ /* Link in a default position */
IntLinkHwnd(Wnd, HWND_TOP); IntLinkHwnd(Wnd, HWND_TOP);
@ -962,8 +965,8 @@ VOID FASTCALL IntLinkHwnd(PWND Wnd, HWND hWndPrev)
} }
else else
{ {
if(WndInsertAfter->spwndNext && if (WndInsertAfter->spwndNext &&
WndInsertAfter->spwndNext->ExStyle & WS_EX_TOPMOST) (WndInsertAfter->spwndNext->ExStyle & WS_EX_TOPMOST))
{ {
Wnd->ExStyle |= WS_EX_TOPMOST; Wnd->ExStyle |= WS_EX_TOPMOST;
} }
@ -1247,20 +1250,20 @@ co_UserSetParent(HWND hWndChild, HWND hWndNewParent)
return( hWndOldParent); return( hWndOldParent);
} }
/* Unlink the window from siblings. children and parent are kept in place. */ /* Unlink the window from siblings. Children and parent are kept in place. */
VOID FASTCALL VOID FASTCALL
IntUnlinkWindow(PWND Wnd) IntUnlinkWindow(PWND Wnd)
{ {
if (Wnd->spwndNext) if (Wnd->spwndNext)
Wnd->spwndNext->spwndPrev = Wnd->spwndPrev; Wnd->spwndNext->spwndPrev = Wnd->spwndPrev;
if (Wnd->spwndPrev) if (Wnd->spwndPrev)
Wnd->spwndPrev->spwndNext = Wnd->spwndNext; Wnd->spwndPrev->spwndNext = Wnd->spwndNext;
if (Wnd->spwndParent && Wnd->spwndParent->spwndChild == Wnd) if (Wnd->spwndParent && Wnd->spwndParent->spwndChild == Wnd)
Wnd->spwndParent->spwndChild = Wnd->spwndNext; Wnd->spwndParent->spwndChild = Wnd->spwndNext;
Wnd->spwndPrev = Wnd->spwndNext = NULL; Wnd->spwndPrev = Wnd->spwndNext = NULL;
} }
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/

View file

@ -30,8 +30,6 @@ DBG_DEFAULT_CHANNEL(UserWinpos);
#define PLACE_MAX 0x0002 #define PLACE_MAX 0x0002
#define PLACE_RECT 0x0004 #define PLACE_RECT 0x0004
VOID FASTCALL IntLinkWindow(PWND Wnd,PWND WndInsertAfter);
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
#if DBG #if DBG