From: Rémi Bernon rbernon@codeweavers.com
Since changes in a parent window state may affect the children state in the driver, ensure the driver gets a chance to update its internal state. --- dlls/win32u/window.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index ab58cabb40e..fe39dd11183 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -1483,6 +1483,18 @@ int win32u_get_window_pixel_format( HWND hwnd ) return ret; }
+static int window_has_client_surface( HWND hwnd ) +{ + WND *win = get_win_ptr( hwnd ); + BOOL ret; + + if (!win || win == WND_DESKTOP || win == WND_OTHER_PROCESS) return FALSE; + ret = win->pixel_format || win->internal_pixel_format || !list_empty(&win->vulkan_surfaces); + release_win_ptr( win ); + + return ret; +} + /*********************************************************************** * NtUserGetProp (win32u.@) * @@ -1962,6 +1974,22 @@ static struct window_surface *get_window_surface( HWND hwnd, UINT swp_flags, BOO return new_surface; }
+static void update_children_window_state( HWND hwnd ) +{ + HWND *children; + int i; + + if (!(children = list_window_children( 0, hwnd, NULL, 0 ))) return; + + for (i = 0; children[i]; i++) + { + if (!window_has_client_surface( children[i] )) continue; + update_window_state( children[i] ); + } + + free( children ); +} + /*********************************************************************** * apply_window_pos * @@ -2109,6 +2137,7 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, stru }
user_driver->pWindowPosChanged( hwnd, insert_after, swp_flags, &monitor_rects, get_driver_window_surface( new_surface, monitor_dpi ) ); + update_children_window_state( hwnd ); }
return ret;