From: Rémi Bernon rbernon@codeweavers.com
In apply_window_pos, to notify any parent or children and let them make the necessary changes for offscreen rendering. --- dlls/win32u/window.c | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-)
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 340ab31e857..fa717c00d09 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -1592,24 +1592,6 @@ int get_window_pixel_format( HWND hwnd ) return ret; }
-static int window_has_client_surface( HWND hwnd ) -{ - struct client_surface *surface; - WND *win = get_win_ptr( hwnd ); - BOOL ret; - - if (!win || win == WND_DESKTOP || win == WND_OTHER_PROCESS) return FALSE; - ret = win->pixel_format || win->current_drawable; - release_win_ptr( win ); - if (ret) return TRUE; - - pthread_mutex_lock( &surfaces_lock ); - LIST_FOR_EACH_ENTRY( surface, &client_surfaces, struct client_surface, entry ) - if ((ret = surface->hwnd == hwnd)) break; - pthread_mutex_unlock( &surfaces_lock ); - return ret; -} - /*********************************************************************** * NtUserGetProp (win32u.@) * @@ -2126,20 +2108,16 @@ static struct window_surface *get_window_surface( HWND hwnd, UINT swp_flags, BOO return new_surface; }
-static void update_children_window_state( HWND hwnd ) +static void update_window_client_surfaces( HWND hwnd ) { HWND *children; int i;
if (!(children = list_window_children( hwnd ))) return; - - for (i = 0; children[i]; i++) - { - if (!window_has_client_surface( children[i] )) continue; - update_window_state( children[i] ); - } - + for (i = 0; children[i]; i++) update_window_client_surfaces( children[i] ); free( children ); + + update_client_surfaces( hwnd ); }
static HICON get_icon_info( HICON icon, ICONINFO *ii ) @@ -2345,9 +2323,7 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, stru
user_driver->pWindowPosChanged( hwnd, insert_after, owner_hint, swp_flags, &monitor_rects, get_driver_window_surface( new_surface, raw_dpi ) ); - update_client_surfaces( hwnd ); - - update_children_window_state( hwnd ); + update_window_client_surfaces( surface_win ); }
return ret;