From 48bb5f90a2e13e27e4f65b656d2f1dd823d3ceed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Wed, 13 Nov 2024 15:54:56 +0100 Subject: [PATCH] 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 --- dlls/winex11.drv/event.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 51554725700..b8ec2dc84d3 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -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 ); }