Reimplemented GetLastActivePopup to get the information from the
server.

diff --git a/include/win.h b/include/win.h
index c83e9e1..7f73559 100644
--- a/include/win.h
+++ b/include/win.h
@@ -55,7 +55,6 @@
     HGLOBAL16      hmemTaskQ;     /* Task queue global memory handle */
     HRGN           hrgnUpdate;    /* Update region */
     HRGN           hrgnWnd;       /* window's region */
-    HWND           hwndLastActive;/* Last active popup hwnd */
     DWORD          dwStyle;       /* Window style (from CreateWindow) */
     DWORD          dwExStyle;     /* Extended style (from CreateWindowEx) */
     DWORD          clsStyle;      /* Class style at window creation */
diff --git a/windows/win.c b/windows/win.c
index 516f644..d19cc09 100644
--- a/windows/win.c
+++ b/windows/win.c
@@ -763,7 +763,6 @@
     pWndDesktop->text              = NULL;
     pWndDesktop->hmemTaskQ         = 0;
     pWndDesktop->hrgnUpdate        = 0;
-    pWndDesktop->hwndLastActive    = hwndDesktop;
     pWndDesktop->clsStyle          = clsStyle;
     pWndDesktop->dce               = NULL;
     pWndDesktop->pVScroll          = NULL;
@@ -1104,7 +1103,6 @@
     wndPtr->hmemTaskQ      = InitThreadInput16( 0, 0 );
     wndPtr->hrgnUpdate     = 0;
     wndPtr->hrgnWnd        = 0;
-    wndPtr->hwndLastActive = hwnd;
     wndPtr->dwStyle        = cs->style & ~WS_VISIBLE;
     wndPtr->dwExStyle      = cs->dwExStyle;
     wndPtr->clsStyle       = clsStyle;
@@ -1489,8 +1487,6 @@
 
     if (!is_child)
     {
-        HWND owner;
-
         for (;;)
         {
             int i, got_one = 0;
@@ -1512,16 +1508,6 @@
             }
             if (!got_one) break;
         }
-
-        if ((owner = GetWindow( hwnd, GW_OWNER )))
-        {
-            WND *ptr = WIN_FindWndPtr( owner );
-            if (ptr)
-            {
-                if (ptr->hwndLastActive == hwnd) ptr->hwndLastActive = owner;
-                WIN_ReleaseWndPtr( ptr );
-            }
-        }
     }
 
       /* Send destroy messages */
@@ -2856,12 +2842,14 @@
  */
 HWND WINAPI GetLastActivePopup( HWND hwnd )
 {
-    HWND retval;
-    WND *wndPtr =WIN_FindWndPtr(hwnd);
-    if (!wndPtr) return hwnd;
-    retval = wndPtr->hwndLastActive;
-    if (!IsWindow( retval )) retval = wndPtr->hwndSelf;
-    WIN_ReleaseWndPtr(wndPtr);
+    HWND retval = hwnd;
+
+    SERVER_START_REQ( get_window_info )
+    {
+        req->handle = hwnd;
+        if (!wine_server_call_err( req )) retval = reply->last_active;
+    }
+    SERVER_END_REQ;
     return retval;
 }