Re: user32: Avoid querying the server to determine whether the desktop window is a child window.
Huw Davies <huw(a)codeweavers.com> writes:
Signed-off-by: Huw Davies <huw(a)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(a)winehq.org
On Wed, Feb 01, 2017 at 05:46:46PM +0100, Alexandre Julliard wrote:
Huw Davies <huw(a)codeweavers.com> writes:
Signed-off-by: Huw Davies <huw(a)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.
Good plan. It's made slightly more complicated by the message window, but I've sent a patch that does that. Huw.
participants (2)
-
Alexandre Julliard -
Huw Davies