Small optimization in WINPOS_GetWinOffset.

This commit is contained in:
Alexandre Julliard 2005-01-17 13:50:00 +00:00
parent d820437b19
commit 149b6e38c9
1 changed files with 2 additions and 2 deletions

View File

@ -478,7 +478,7 @@ static void WINPOS_GetWinOffset( HWND hwndFrom, HWND hwndTo, POINT *offset )
{
HWND hwnd = hwndFrom;
while (hwnd)
while (hwnd && hwnd != GetDesktopWindow())
{
if (hwnd == hwndTo) return;
if (!(wndPtr = WIN_GetPtr( hwnd )))
@ -499,7 +499,7 @@ static void WINPOS_GetWinOffset( HWND hwndFrom, HWND hwndTo, POINT *offset )
{
HWND hwnd = hwndTo;
while (hwnd)
while (hwnd && hwnd != GetDesktopWindow())
{
if (!(wndPtr = WIN_GetPtr( hwnd )))
{