[PATCH] user32: Return correct showCmd from GetWindowPlacement() for other process window.

Alexandre Julliard julliard at winehq.org
Tue Aug 13 04:12:57 CDT 2019


Paul Gofman <gofmanp at gmail.com> writes:

> @@ -1280,11 +1280,38 @@ BOOL WINAPI GetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *wndpl )
>      }
>      if (pWnd == WND_OTHER_PROCESS)
>      {
> -        if (!IsWindow( hwnd )) return FALSE;
> -        FIXME( "not supported on other process window %p\n", hwnd );
> -        /* provide some dummy information */
> +        DWORD style, is_window;
> +
> +        FIXME( "not fully supported on other process window %p.\n", hwnd );
> +
> +        SERVER_START_REQ( set_window_info )
> +        {
> +            req->handle = wine_server_user_handle( hwnd );
> +            req->flags  = 0;  /* don't set anything, just retrieve */
> +            req->extra_offset = -1;
> +            req->extra_size = 0;
> +            if (wine_server_call_err( req ))
> +            {
> +                style = 0;
> +                is_window = FALSE;
> +            }
> +            else
> +            {
> +                style = reply->old_style;
> +                is_window = TRUE;
> +            }
> +        }
> +        SERVER_END_REQ;
> +
> +        if (!is_window)
> +            return FALSE;

You can use GetWindowLong() for this, there's no need to add a server
call here.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list