Commit 149b6e38 authored by Alexandre Julliard's avatar Alexandre Julliard

Small optimization in WINPOS_GetWinOffset.

parent d820437b
......@@ -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 )))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment