Avoid problems during changing the Z-order if the window and the
window to insert after are the same.
diff --git a/windows/winpos.c b/windows/winpos.c
index 67d230a..1c6fb94 100644
--- a/windows/winpos.c
+++ b/windows/winpos.c
@@ -2636,7 +2636,7 @@
wvrFlags = SWP_DoNCCalcSize( wndPtr, &winpos, &newWindowRect, &newClientRect, flags );
- if(!(winpos.flags & SWP_NOZORDER))
+ if(!(winpos.flags & SWP_NOZORDER) && winpos.hwnd != hwndInsertAfter)
{
if ( WIN_UnlinkWindow( winpos.hwnd ) )
WIN_LinkWindow( winpos.hwnd, hwndInsertAfter );