#6: Add SWP_NOZORDER in the case it's not needed
Dmitry Timoshkov
dmitry at baikal.ru
Thu Apr 1 08:42:11 CST 2004
Hello,
We can add SWP_NOZORDER for HWND_TOP and HWND_BOTTOM cases if the window
is already either first or last sibling. This allows to avoid at least
needless WM_WINDOWPOSCHANGED for ShowWindow(SW_SHOW) calls.
Please apply after #5.
Changelog:
Dmitry Timoshkov <dmitry at codeweavers.com>
Add SWP_NOZORDER in the case it's not needed.
--- cvs/hq/wine/dlls/x11drv/winpos.c 2004-04-01 22:54:18.000000000 +0900
+++ wine/dlls/x11drv/winpos.c 2004-04-01 22:56:40.000000000 +0900
@@ -763,7 +763,6 @@ static BOOL fixup_flags( WINDOWPOS *winp
{
winpos->flags &= ~SWP_NOZORDER;
winpos->hwndInsertAfter = HWND_TOP;
- goto done;
}
}
@@ -779,7 +778,17 @@ static BOOL fixup_flags( WINDOWPOS *winp
(winpos->hwndInsertAfter == HWND_NOTOPMOST)) winpos->hwndInsertAfter = HWND_TOP;
/* hwndInsertAfter must be a sibling of the window */
- if ((winpos->hwndInsertAfter != HWND_TOP) && (winpos->hwndInsertAfter != HWND_BOTTOM))
+ if (winpos->hwndInsertAfter == HWND_TOP)
+ {
+ if (GetWindow(winpos->hwnd, GW_HWNDFIRST) == winpos->hwnd)
+ winpos->flags |= SWP_NOZORDER;
+ }
+ else if (winpos->hwndInsertAfter == HWND_BOTTOM)
+ {
+ if (GetWindow(winpos->hwnd, GW_HWNDLAST) == winpos->hwnd)
+ winpos->flags |= SWP_NOZORDER;
+ }
+ else
{
if (GetAncestor( winpos->hwndInsertAfter, GA_PARENT ) != wndPtr->parent) ret = FALSE;
else
More information about the wine-patches
mailing list