From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/window.c | 28 ++++------------------------ server/protocol.def | 1 - server/window.c | 1 - 3 files changed, 4 insertions(+), 26 deletions(-)
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 64fc0be3dfd..8374f061d6d 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -229,36 +229,16 @@ HWND get_hwnd_message_parent(void) */ HWND get_full_window_handle( HWND hwnd ) { - WND *win; + struct user_entry entry; + HANDLE handle;
if (!hwnd || (ULONG_PTR)hwnd >> 16) return hwnd; if (LOWORD(hwnd) <= 1 || LOWORD(hwnd) == 0xffff) return hwnd; /* do sign extension for -2 and -3 */ if (LOWORD(hwnd) >= (WORD)-3) return (HWND)(LONG_PTR)(INT16)LOWORD(hwnd);
- if (!(win = get_win_ptr( hwnd ))) return hwnd; - - if (win == WND_DESKTOP) - { - if (LOWORD(hwnd) == LOWORD(get_desktop_window())) return get_desktop_window(); - else return get_hwnd_message_parent(); - } - - if (win != WND_OTHER_PROCESS) - { - hwnd = win->obj.handle; - release_win_ptr( win ); - } - else /* may belong to another process */ - { - SERVER_START_REQ( get_window_info ) - { - req->handle = wine_server_user_handle( hwnd ); - if (!wine_server_call_err( req )) hwnd = wine_server_ptr_handle( reply->full_handle ); - } - SERVER_END_REQ; - } - return hwnd; + if (!get_user_entry( hwnd, NTUSER_OBJ_WINDOW, &entry, &handle )) return 0; + return handle; }
/******************************************************************* diff --git a/server/protocol.def b/server/protocol.def index 4d2907bd31e..516dc1a7a95 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -2582,7 +2582,6 @@ enum message_type @REQ(get_window_info) user_handle_t handle; /* handle to the window */ @REPLY - user_handle_t full_handle; /* full 32-bit handle */ user_handle_t last_active; /* last active popup */ process_id_t pid; /* process owning the window */ thread_id_t tid; /* thread owning the window */ diff --git a/server/window.c b/server/window.c index b0fb032d562..8cbe55077bf 100644 --- a/server/window.c +++ b/server/window.c @@ -2321,7 +2321,6 @@ DECL_HANDLER(get_window_info)
if (!win) return;
- reply->full_handle = win->handle; reply->last_active = win->handle; reply->is_unicode = win->is_unicode; reply->dpi_context = win->dpi_context;