winex11: Retrieve the HWND for the host window's child window.

Instead of the host window itself, which will never have one.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57370
This commit is contained in:
Rémi Bernon 2024-11-13 15:54:56 +01:00 committed by Alexandre Julliard
parent 7352196f6a
commit 48bb5f90a2
Notes: Alexandre Julliard 2024-11-14 23:13:45 +01:00
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6815

View file

@ -183,16 +183,6 @@ static void host_window_send_configure_events( struct host_window *win, Display
BOOL has_serial;
HWND hwnd;
/* Only send a fake event if we're not expecting one from a state/config request.
* We may know what was requested, but not what the WM will decide to reply, and our
* fake event might trigger some undesired changes before the real ConfigureNotify.
*/
if (XFindContext( display, win->window, winContext, (char **)&hwnd )) continue;
if (!(data = get_win_data( hwnd ))) continue;
has_serial = data->wm_state_serial || data->configure_serial;
release_win_data( data );
if (has_serial) continue;
configure.event = win->children[i].window;
configure.window = configure.event;
configure.x = rect.left;
@ -201,6 +191,16 @@ static void host_window_send_configure_events( struct host_window *win, Display
configure.height = rect.bottom - rect.top;
configure.send_event = 0;
/* Only send a fake event if we're not expecting one from a state/config request.
* We may know what was requested, but not what the WM will decide to reply, and our
* fake event might trigger some undesired changes before the real ConfigureNotify.
*/
if (XFindContext( configure.display, configure.window, winContext, (char **)&hwnd )) continue;
if (!(data = get_win_data( hwnd ))) continue;
has_serial = data->wm_state_serial || data->configure_serial;
release_win_data( data );
if (has_serial) continue;
TRACE( "generating ConfigureNotify for window %p/%lx, rect %s\n", hwnd, configure.window, wine_dbgstr_rect(&rect) );
XPutBackEvent( configure.display, (XEvent *)&configure );
}