https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4d057cf6267bcbe7be3253...
commit 4d057cf6267bcbe7be3253fa3caa59f5b1feeb87 Author: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org AuthorDate: Sun Jul 8 02:23:52 2018 +0200 Commit: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org CommitDate: Sun Jul 8 15:39:48 2018 +0200
[WIN32K:NTUSER] Formatting only! --- win32ss/user/ntuser/window.c | 75 +++++++++++++++++++++++--------------------- win32ss/user/ntuser/winpos.c | 2 -- 2 files changed, 39 insertions(+), 38 deletions(-)
diff --git a/win32ss/user/ntuser/window.c b/win32ss/user/ntuser/window.c index 06dabf37cb..027dec2a63 100644 --- a/win32ss/user/ntuser/window.c +++ b/win32ss/user/ntuser/window.c @@ -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 IntLinkWindow( - PWND Wnd, - PWND WndInsertAfter /* set to NULL if top sibling */ + PWND Wnd, + PWND WndInsertAfter /* Set to NULL if top sibling */ ) { - if ((Wnd->spwndPrev = WndInsertAfter)) - { - /* link after WndInsertAfter */ - if ((Wnd->spwndNext = WndInsertAfter->spwndNext)) - Wnd->spwndNext->spwndPrev = Wnd; + Wnd->spwndPrev = WndInsertAfter; + if (Wnd->spwndPrev) + { + /* Link after WndInsertAfter */ + Wnd->spwndNext = WndInsertAfter->spwndNext; + if (Wnd->spwndNext) + Wnd->spwndNext->spwndPrev = Wnd;
- Wnd->spwndPrev->spwndNext = Wnd; - } - else - { - /* link at top */ - if ((Wnd->spwndNext = Wnd->spwndParent->spwndChild)) - Wnd->spwndNext->spwndPrev = Wnd; + Wnd->spwndPrev->spwndNext = Wnd; + } + else + { + /* Link at the top */ + Wnd->spwndNext = Wnd->spwndParent->spwndChild; + 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 (!(Wnd->ExStyle & WS_EX_TOPMOST) && - (Wnd->ExStyle2 & WS_EX2_LINKED)) return; /* nothing to do */ + if (!(Wnd->ExStyle & WS_EX_TOPMOST) && (Wnd->ExStyle2 & WS_EX2_LINKED)) + return; /* nothing to do */ Wnd->ExStyle &= ~WS_EX_TOPMOST; hWndPrev = HWND_TOP; /* fallback to the HWND_TOP case */ } @@ -903,8 +903,10 @@ VOID FASTCALL IntLinkHwnd(PWND Wnd, HWND hWndPrev) PWND WndInsertAfter;
WndInsertAfter = Wnd->spwndParent->spwndChild; - while( WndInsertAfter && WndInsertAfter->spwndNext) + while (WndInsertAfter && WndInsertAfter->spwndNext) + { WndInsertAfter = WndInsertAfter->spwndNext; + }
IntLinkWindow(Wnd, WndInsertAfter); Wnd->ExStyle &= ~WS_EX_TOPMOST; @@ -913,7 +915,6 @@ VOID FASTCALL IntLinkHwnd(PWND Wnd, HWND hWndPrev) { /* Link in the top of the list */ IntLinkWindow(Wnd, NULL); - Wnd->ExStyle |= WS_EX_TOPMOST; } else if (hWndPrev == HWND_TOP) @@ -927,7 +928,9 @@ VOID FASTCALL IntLinkHwnd(PWND Wnd, HWND hWndPrev) { 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 */ { Wnd->ExStyle |= WS_EX_TOPMOST; @@ -946,7 +949,7 @@ VOID FASTCALL IntLinkHwnd(PWND Wnd, HWND hWndPrev)
WndInsertAfter = UserGetWindowObject(hWndPrev); /* Are we called with an erroneous handle */ - if(WndInsertAfter == NULL) + if (WndInsertAfter == NULL) { /* Link in a default position */ IntLinkHwnd(Wnd, HWND_TOP); @@ -962,8 +965,8 @@ VOID FASTCALL IntLinkHwnd(PWND Wnd, HWND hWndPrev) } else { - if(WndInsertAfter->spwndNext && - WndInsertAfter->spwndNext->ExStyle & WS_EX_TOPMOST) + if (WndInsertAfter->spwndNext && + (WndInsertAfter->spwndNext->ExStyle & WS_EX_TOPMOST)) { Wnd->ExStyle |= WS_EX_TOPMOST; } @@ -1247,20 +1250,20 @@ co_UserSetParent(HWND hWndChild, HWND hWndNewParent) 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 IntUnlinkWindow(PWND Wnd) { - if (Wnd->spwndNext) - Wnd->spwndNext->spwndPrev = Wnd->spwndPrev; + if (Wnd->spwndNext) + Wnd->spwndNext->spwndPrev = Wnd->spwndPrev;
- if (Wnd->spwndPrev) - Wnd->spwndPrev->spwndNext = Wnd->spwndNext; + if (Wnd->spwndPrev) + Wnd->spwndPrev->spwndNext = Wnd->spwndNext;
- if (Wnd->spwndParent && Wnd->spwndParent->spwndChild == Wnd) - Wnd->spwndParent->spwndChild = Wnd->spwndNext; + if (Wnd->spwndParent && Wnd->spwndParent->spwndChild == Wnd) + Wnd->spwndParent->spwndChild = Wnd->spwndNext;
- Wnd->spwndPrev = Wnd->spwndNext = NULL; + Wnd->spwndPrev = Wnd->spwndNext = NULL; }
/* FUNCTIONS *****************************************************************/ diff --git a/win32ss/user/ntuser/winpos.c b/win32ss/user/ntuser/winpos.c index 370a0ff0ad..d1f975ef42 100644 --- a/win32ss/user/ntuser/winpos.c +++ b/win32ss/user/ntuser/winpos.c @@ -30,8 +30,6 @@ DBG_DEFAULT_CHANNEL(UserWinpos); #define PLACE_MAX 0x0002 #define PLACE_RECT 0x0004
-VOID FASTCALL IntLinkWindow(PWND Wnd,PWND WndInsertAfter); - /* FUNCTIONS *****************************************************************/
#if DBG