user32: Avoid querying the server to determine whether the desktop window is a child window.

Alexandre Julliard julliard at winehq.org
Wed Feb 1 10:46:46 CST 2017


Huw Davies <huw at codeweavers.com> writes:

> Signed-off-by: Huw Davies <huw at codeweavers.com>
> ---
>  dlls/user32/win.c | 31 +++++++++++++++++++++++++++++--
>  1 file changed, 29 insertions(+), 2 deletions(-)
>
> diff --git a/dlls/user32/win.c b/dlls/user32/win.c
> index a7be4a3..341769f 100644
> --- a/dlls/user32/win.c
> +++ b/dlls/user32/win.c
> @@ -414,6 +414,33 @@ static HWND *list_window_parents( HWND hwnd )
>      return NULL;
>  }
>  
> +/*******************************************************************
> + *		is_child_win
> + *
> + * Helper to determine whether WS_CHILD is set.
> + * It avoids a server round trip for the desktop window.
> + */

We could probably make GetWindowLong return hardcoded values for the
desktop window, so that all callers benefit.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list