From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/driver.c | 3 +-- dlls/win32u/window.c | 4 ++-- dlls/wineandroid.drv/android.h | 3 +-- dlls/wineandroid.drv/window.c | 5 ++--- dlls/winemac.drv/macdrv.h | 3 +-- dlls/winemac.drv/window.c | 5 ++--- dlls/winewayland.drv/waylanddrv.h | 3 +-- dlls/winewayland.drv/window.c | 7 +++---- dlls/winex11.drv/window.c | 5 ++--- dlls/winex11.drv/x11drv.h | 5 ++--- include/wine/gdi_driver.h | 2 +- 11 files changed, 18 insertions(+), 27 deletions(-)
diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c index b4afba45a0a..41355ee2788 100644 --- a/dlls/win32u/driver.c +++ b/dlls/win32u/driver.c @@ -884,8 +884,7 @@ static LRESULT nulldrv_WindowMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM return 0; }
-static BOOL nulldrv_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags, - const RECT *window_rect, const RECT *client_rect, +static BOOL nulldrv_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, RECT *visible_rect, struct window_surface **surface ) { return FALSE; diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index c0ebeb6e8a9..c5d098dec63 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -1800,8 +1800,8 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, window_surface_add_ref( new_surface ); } visible_rect = *window_rect; - if (!(ret = user_driver->pWindowPosChanging( hwnd, insert_after, swp_flags, - window_rect, client_rect, &visible_rect, &new_surface ))) + if (!(ret = user_driver->pWindowPosChanging( hwnd, swp_flags, window_rect, client_rect, + &visible_rect, &new_surface ))) { if (IsRectEmpty( window_rect )) visible_rect = *window_rect; else diff --git a/dlls/wineandroid.drv/android.h b/dlls/wineandroid.drv/android.h index 8e4b04ebac7..a30dcb06aef 100644 --- a/dlls/wineandroid.drv/android.h +++ b/dlls/wineandroid.drv/android.h @@ -101,8 +101,7 @@ extern UINT ANDROID_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp ); extern BOOL ANDROID_CreateLayeredWindow( HWND hwnd, const RECT *window_rect, COLORREF color_key, struct window_surface **surface ); extern LRESULT ANDROID_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ); -extern BOOL ANDROID_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags, - const RECT *window_rect, const RECT *client_rect, +extern BOOL ANDROID_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, RECT *visible_rect, struct window_surface **surface ); extern void ANDROID_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c index dcfbb364cb7..6d05af575f3 100644 --- a/dlls/wineandroid.drv/window.c +++ b/dlls/wineandroid.drv/window.c @@ -1136,9 +1136,8 @@ static inline BOOL get_surface_rect( const RECT *visible_rect, RECT *surface_rec /*********************************************************************** * ANDROID_WindowPosChanging */ -BOOL ANDROID_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags, - const RECT *window_rect, const RECT *client_rect, RECT *visible_rect, - struct window_surface **surface ) +BOOL ANDROID_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, + RECT *visible_rect, struct window_surface **surface ) { struct android_win_data *data = get_win_data( hwnd ); RECT surface_rect; diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index 12ca8c7722e..6f5af2d5f94 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -150,8 +150,7 @@ extern BOOL macdrv_CreateLayeredWindow(HWND hwnd, const RECT *window_rect, COLOR extern void macdrv_UpdateLayeredWindow(HWND hwnd, const RECT *window_rect, COLORREF color_key, BYTE alpha, UINT flags); extern LRESULT macdrv_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp); -extern BOOL macdrv_WindowPosChanging(HWND hwnd, HWND insert_after, UINT swp_flags, - const RECT *window_rect, const RECT *client_rect, +extern BOOL macdrv_WindowPosChanging(HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, RECT *visible_rect, struct window_surface **surface); extern void macdrv_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index dacda1e7e78..3d6fb1aa6d2 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -2000,15 +2000,14 @@ static inline RECT get_surface_rect(const RECT *visible_rect) /*********************************************************************** * WindowPosChanging (MACDRV.@) */ -BOOL macdrv_WindowPosChanging(HWND hwnd, HWND insert_after, UINT swp_flags, - const RECT *window_rect, const RECT *client_rect, +BOOL macdrv_WindowPosChanging(HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, RECT *visible_rect, struct window_surface **surface) { struct macdrv_win_data *data = get_win_data(hwnd); DWORD style = NtUserGetWindowLongW(hwnd, GWL_STYLE); RECT surface_rect;
- TRACE("%p after %p swp %04x window %s client %s visible %s surface %p\n", hwnd, insert_after, + TRACE("%p swp %04x window %s client %s visible %s surface %p\n", hwnd, swp_flags, wine_dbgstr_rect(window_rect), wine_dbgstr_rect(client_rect), wine_dbgstr_rect(visible_rect), surface);
diff --git a/dlls/winewayland.drv/waylanddrv.h b/dlls/winewayland.drv/waylanddrv.h index 7943c97a1dc..55d4860fa48 100644 --- a/dlls/winewayland.drv/waylanddrv.h +++ b/dlls/winewayland.drv/waylanddrv.h @@ -337,8 +337,7 @@ void WAYLAND_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, const RECT *visible_rect, const RECT *valid_rects, struct window_surface *surface); -BOOL WAYLAND_WindowPosChanging(HWND hwnd, HWND insert_after, UINT swp_flags, - const RECT *window_rect, const RECT *client_rect, +BOOL WAYLAND_WindowPosChanging(HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, RECT *visible_rect, struct window_surface **surface); UINT WAYLAND_VulkanInit(UINT version, void *vulkan_handle, const struct vulkan_driver_funcs **driver_funcs); struct opengl_funcs *WAYLAND_wine_get_wgl_driver(UINT version); diff --git a/dlls/winewayland.drv/window.c b/dlls/winewayland.drv/window.c index 274ce24db4c..031fca9e62e 100644 --- a/dlls/winewayland.drv/window.c +++ b/dlls/winewayland.drv/window.c @@ -444,8 +444,7 @@ void WAYLAND_DestroyWindow(HWND hwnd) /*********************************************************************** * WAYLAND_WindowPosChanging */ -BOOL WAYLAND_WindowPosChanging(HWND hwnd, HWND insert_after, UINT swp_flags, - const RECT *window_rect, const RECT *client_rect, +BOOL WAYLAND_WindowPosChanging(HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, RECT *visible_rect, struct window_surface **surface) { struct wayland_win_data *data = wayland_win_data_get(hwnd); @@ -453,9 +452,9 @@ BOOL WAYLAND_WindowPosChanging(HWND hwnd, HWND insert_after, UINT swp_flags, BOOL visible; RECT surface_rect;
- TRACE("hwnd %p window %s client %s visible %s after %p flags %08x\n", + TRACE("hwnd %p window %s client %s visible %s flags %08x\n", hwnd, wine_dbgstr_rect(window_rect), wine_dbgstr_rect(client_rect), - wine_dbgstr_rect(visible_rect), insert_after, swp_flags); + wine_dbgstr_rect(visible_rect), swp_flags);
if (!data && !(data = wayland_win_data_create(hwnd, window_rect, client_rect))) return TRUE; diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 845cd896bb0..a13f5fb68e6 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2593,9 +2593,8 @@ static inline BOOL get_surface_rect( const RECT *visible_rect, RECT *surface_rec /*********************************************************************** * WindowPosChanging (X11DRV.@) */ -BOOL X11DRV_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags, - const RECT *window_rect, const RECT *client_rect, RECT *visible_rect, - struct window_surface **surface ) +BOOL X11DRV_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, + RECT *visible_rect, struct window_surface **surface ) { struct x11drv_win_data *data = get_win_data( hwnd ); RECT surface_rect; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 6d257a2afbd..2704bfd5948 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -243,9 +243,8 @@ extern void X11DRV_UpdateClipboard(void); extern BOOL X11DRV_CreateLayeredWindow( HWND hwnd, const RECT *window_rect, COLORREF color_key, struct window_surface **surface ); extern LRESULT X11DRV_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ); -extern BOOL X11DRV_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags, - const RECT *window_rect, const RECT *client_rect, RECT *visible_rect, - struct window_surface **surface ); +extern BOOL X11DRV_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, + RECT *visible_rect, struct window_surface **surface ); extern void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, const RECT *rectWindow, const RECT *rectClient, const RECT *visible_rect, const RECT *valid_rects, diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index bf73f2bc0ce..5f77b4624d3 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -337,7 +337,7 @@ struct user_driver_funcs BOOL (*pCreateLayeredWindow)(HWND,const RECT *,COLORREF,struct window_surface **); void (*pUpdateLayeredWindow)(HWND,const RECT *,COLORREF,BYTE,UINT); LRESULT (*pWindowMessage)(HWND,UINT,WPARAM,LPARAM); - BOOL (*pWindowPosChanging)(HWND,HWND,UINT,const RECT *,const RECT *,RECT *, + BOOL (*pWindowPosChanging)(HWND,UINT,const RECT *,const RECT *,RECT *, struct window_surface**); void (*pWindowPosChanged)(HWND,HWND,UINT,const RECT *,const RECT *,const RECT *, const RECT *,struct window_surface*);
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/wineandroid.drv/window.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c index 6d05af575f3..ea2c8935d2c 100644 --- a/dlls/wineandroid.drv/window.c +++ b/dlls/wineandroid.drv/window.c @@ -1150,16 +1150,12 @@ BOOL ANDROID_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_re hwnd, wine_dbgstr_rect(window_rect), wine_dbgstr_rect(client_rect), (int)NtUserGetWindowLongW( hwnd, GWL_STYLE ), swp_flags );
- if (!data && !(data = create_win_data( hwnd, window_rect, client_rect ))) return TRUE; + if (!data && !(data = create_win_data( hwnd, window_rect, client_rect ))) return TRUE; /* use default surface */
- *visible_rect = *window_rect; - - /* create the window surface if necessary */ - - if (data->parent) goto done; - if (swp_flags & SWP_HIDEWINDOW) goto done; - if (is_argb_surface( data->surface )) goto done; - if (!get_surface_rect( visible_rect, &surface_rect )) goto done; + if (data->parent) goto done; /* use default surface */ + if (swp_flags & SWP_HIDEWINDOW) goto done; /* use default surface */ + if (is_argb_surface( data->surface )) goto done; /* use default surface */ + if (!get_surface_rect( visible_rect, &surface_rect )) goto done; /* use default surface */
if (data->surface) {
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winemac.drv/window.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 3d6fb1aa6d2..28deb0220f1 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -2011,17 +2011,15 @@ BOOL macdrv_WindowPosChanging(HWND hwnd, UINT swp_flags, const RECT *window_rect swp_flags, wine_dbgstr_rect(window_rect), wine_dbgstr_rect(client_rect), wine_dbgstr_rect(visible_rect), surface);
- if (!data && !(data = macdrv_create_win_data(hwnd, window_rect, client_rect))) return TRUE; + if (!data && !(data = macdrv_create_win_data(hwnd, window_rect, client_rect))) return TRUE; /* use default surface */
- *visible_rect = *window_rect; macdrv_window_to_mac_rect(data, style, visible_rect, window_rect, client_rect); TRACE("visible_rect %s -> %s\n", wine_dbgstr_rect(window_rect), wine_dbgstr_rect(visible_rect));
- /* create the window surface if necessary */ - if (!data->cocoa_window) goto done; - if (swp_flags & SWP_HIDEWINDOW) goto done; - if (data->ulw_layered) goto done; + if (!data->cocoa_window) goto done; /* use default surface */ + if (swp_flags & SWP_HIDEWINDOW) goto done; /* use default surface */ + if (data->ulw_layered) goto done; /* use default surface */
if (*surface) window_surface_release(*surface); *surface = NULL;
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winex11.drv/window.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index a13f5fb68e6..f71b8eb8c10 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2602,7 +2602,7 @@ BOOL X11DRV_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rec COLORREF key; BOOL layered = NtUserGetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYERED;
- if (!data && !(data = X11DRV_create_win_data( hwnd, window_rect, client_rect ))) return TRUE; + if (!data && !(data = X11DRV_create_win_data( hwnd, window_rect, client_rect ))) return TRUE; /* use default surface */
/* check if we need to switch the window to managed */ if (!data->managed && data->whole_window && is_window_managed( hwnd, swp_flags, window_rect )) @@ -2610,27 +2610,24 @@ BOOL X11DRV_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rec TRACE( "making win %p/%lx managed\n", hwnd, data->whole_window ); release_win_data( data ); unmap_window( hwnd ); - if (!(data = get_win_data( hwnd ))) return TRUE; + if (!(data = get_win_data( hwnd ))) return TRUE; /* use default surface */ data->managed = TRUE; }
- *visible_rect = *window_rect; X11DRV_window_to_X_rect( data, visible_rect, window_rect, client_rect );
- /* create the window surface if necessary */ - - if (!data->whole_window && !data->embedded) goto done; - if (swp_flags & SWP_HIDEWINDOW) goto done; - if (data->use_alpha) goto done; - if (!get_surface_rect( visible_rect, &surface_rect )) goto done; + if (!data->whole_window && !data->embedded) goto done; /* use default surface */ + if (swp_flags & SWP_HIDEWINDOW) goto done; /* use default surface */ + if (data->use_alpha) goto done; /* use default surface */ + if (!get_surface_rect( visible_rect, &surface_rect )) goto done; /* use default surface */
if (*surface) window_surface_release( *surface ); *surface = NULL; /* indicate that we want to draw directly to the window */
- if (data->embedded) goto done; - if (data->whole_window == root_window) goto done; - if (data->client_window) goto done; - if (!client_side_graphics && !layered) goto done; + if (data->embedded) goto done; /* draw directly to the window */ + if (data->whole_window == root_window) goto done; /* draw directly to the window */ + if (data->client_window) goto done; /* draw directly to the window */ + if (!client_side_graphics && !layered) goto done; /* draw directly to the window */
if (data->surface) {
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/driver.c | 10 ++++-- dlls/win32u/window.c | 25 ++++++--------- dlls/wineandroid.drv/android.h | 4 +-- dlls/wineandroid.drv/init.c | 1 + dlls/wineandroid.drv/window.c | 35 ++++++++++++++++----- dlls/winemac.drv/gdi.c | 1 + dlls/winemac.drv/macdrv.h | 4 +-- dlls/winemac.drv/window.c | 32 ++++++++++++++++---- dlls/winewayland.drv/waylanddrv.h | 4 +-- dlls/winewayland.drv/waylanddrv_main.c | 1 + dlls/winewayland.drv/window.c | 42 ++++++++++++++++++-------- dlls/winex11.drv/init.c | 1 + dlls/winex11.drv/window.c | 35 ++++++++++++++++----- dlls/winex11.drv/x11drv.h | 4 +-- include/wine/gdi_driver.h | 4 +-- 15 files changed, 142 insertions(+), 61 deletions(-)
diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c index 41355ee2788..723270f1453 100644 --- a/dlls/win32u/driver.c +++ b/dlls/win32u/driver.c @@ -884,8 +884,12 @@ static LRESULT nulldrv_WindowMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM return 0; }
-static BOOL nulldrv_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, - RECT *visible_rect, struct window_surface **surface ) +static BOOL nulldrv_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, RECT *visible_rect ) +{ + return TRUE; +} + +static BOOL nulldrv_CreateWindowSurface( HWND hwnd, UINT swp_flags, const RECT *visible_rect, struct window_surface **surface ) { return FALSE; } @@ -1293,6 +1297,7 @@ static const struct user_driver_funcs lazy_load_driver = loaderdrv_UpdateLayeredWindow, nulldrv_WindowMessage, nulldrv_WindowPosChanging, + nulldrv_CreateWindowSurface, nulldrv_WindowPosChanged, /* system parameters */ nulldrv_SystemParametersInfo, @@ -1380,6 +1385,7 @@ void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version SET_USER_FUNC(UpdateLayeredWindow); SET_USER_FUNC(WindowMessage); SET_USER_FUNC(WindowPosChanging); + SET_USER_FUNC(CreateWindowSurface); SET_USER_FUNC(WindowPosChanged); SET_USER_FUNC(SystemParametersInfo); SET_USER_FUNC(VulkanInit); diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index c5d098dec63..4426ba3ac43 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -1790,26 +1790,20 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, { WND *win; HWND surface_win = 0, parent = NtUserGetAncestor( hwnd, GA_PARENT ); - BOOL ret, needs_update = FALSE; - RECT visible_rect, old_visible_rect, old_window_rect, old_client_rect, extra_rects[3]; + BOOL ret, needs_surface, needs_update = FALSE; + RECT visible_rect = *window_rect, old_visible_rect, old_window_rect, old_client_rect, extra_rects[3]; struct window_surface *old_surface, *new_surface = NULL;
+ needs_surface = user_driver->pWindowPosChanging( hwnd, swp_flags, window_rect, client_rect, &visible_rect ); + if (!parent || parent == get_desktop_window()) { new_surface = &dummy_surface; /* provide a default surface for top-level windows */ window_surface_add_ref( new_surface ); } - visible_rect = *window_rect; - if (!(ret = user_driver->pWindowPosChanging( hwnd, swp_flags, window_rect, client_rect, - &visible_rect, &new_surface ))) - { - if (IsRectEmpty( window_rect )) visible_rect = *window_rect; - else - { - visible_rect = get_virtual_screen_rect( get_thread_dpi() ); - intersect_rect( &visible_rect, &visible_rect, window_rect ); - } - } + + if (!needs_surface || IsRectEmpty( &visible_rect )) needs_surface = FALSE; /* use default surface */ + else needs_surface = !user_driver->pCreateWindowSurface( hwnd, swp_flags, &visible_rect, &new_surface );
get_window_rects( hwnd, COORDS_SCREEN, &old_window_rect, NULL, get_thread_dpi() ); if (IsRectEmpty( &valid_rects[0] )) valid_rects = NULL; @@ -1821,9 +1815,8 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, }
/* create or update window surface for top-level windows if the driver doesn't implement WindowPosChanging */ - if (!ret && new_surface && !IsRectEmpty( &visible_rect ) && - (!(get_window_long( hwnd, GWL_EXSTYLE ) & WS_EX_LAYERED) || - NtUserGetLayeredWindowAttributes( hwnd, NULL, NULL, NULL ))) + if (needs_surface && new_surface && (!(get_window_long( hwnd, GWL_EXSTYLE ) & WS_EX_LAYERED) || + NtUserGetLayeredWindowAttributes( hwnd, NULL, NULL, NULL ))) { window_surface_release( new_surface ); if ((new_surface = win->surface)) window_surface_add_ref( new_surface ); diff --git a/dlls/wineandroid.drv/android.h b/dlls/wineandroid.drv/android.h index a30dcb06aef..72be3c4f5a8 100644 --- a/dlls/wineandroid.drv/android.h +++ b/dlls/wineandroid.drv/android.h @@ -101,8 +101,8 @@ extern UINT ANDROID_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp ); extern BOOL ANDROID_CreateLayeredWindow( HWND hwnd, const RECT *window_rect, COLORREF color_key, struct window_surface **surface ); extern LRESULT ANDROID_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ); -extern BOOL ANDROID_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, - RECT *visible_rect, struct window_surface **surface ); +extern BOOL ANDROID_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, RECT *visible_rect ); +extern BOOL ANDROID_CreateWindowSurface( HWND hwnd, UINT swp_flags, const RECT *visible_rect, struct window_surface **surface ); extern void ANDROID_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, const RECT *visible_rect, const RECT *valid_rects, diff --git a/dlls/wineandroid.drv/init.c b/dlls/wineandroid.drv/init.c index b3c159aa7e1..73fd28c7c69 100644 --- a/dlls/wineandroid.drv/init.c +++ b/dlls/wineandroid.drv/init.c @@ -351,6 +351,7 @@ static const struct user_driver_funcs android_drv_funcs = .pCreateLayeredWindow = ANDROID_CreateLayeredWindow, .pWindowMessage = ANDROID_WindowMessage, .pWindowPosChanging = ANDROID_WindowPosChanging, + .pCreateWindowSurface = ANDROID_CreateWindowSurface, .pWindowPosChanged = ANDROID_WindowPosChanged, .pwine_get_wgl_driver = ANDROID_wine_get_wgl_driver, }; diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c index ea2c8935d2c..764b202d6e5 100644 --- a/dlls/wineandroid.drv/window.c +++ b/dlls/wineandroid.drv/window.c @@ -1136,27 +1136,48 @@ static inline BOOL get_surface_rect( const RECT *visible_rect, RECT *surface_rec /*********************************************************************** * ANDROID_WindowPosChanging */ -BOOL ANDROID_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, - RECT *visible_rect, struct window_surface **surface ) +BOOL ANDROID_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, RECT *visible_rect ) { struct android_win_data *data = get_win_data( hwnd ); RECT surface_rect; - DWORD flags; - COLORREF key; - BYTE alpha; - BOOL layered = NtUserGetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYERED; + BOOL ret = FALSE;
TRACE( "win %p window %s client %s style %08x flags %08x\n", hwnd, wine_dbgstr_rect(window_rect), wine_dbgstr_rect(client_rect), (int)NtUserGetWindowLongW( hwnd, GWL_STYLE ), swp_flags );
- if (!data && !(data = create_win_data( hwnd, window_rect, client_rect ))) return TRUE; /* use default surface */ + if (!data && !(data = create_win_data( hwnd, window_rect, client_rect ))) return FALSE; /* use default surface */
if (data->parent) goto done; /* use default surface */ if (swp_flags & SWP_HIDEWINDOW) goto done; /* use default surface */ if (is_argb_surface( data->surface )) goto done; /* use default surface */ if (!get_surface_rect( visible_rect, &surface_rect )) goto done; /* use default surface */
+ ret = TRUE; + +done: + release_win_data(data); + return ret; +} + + +/*********************************************************************** + * ANDROID_CreateWindowSurface + */ +BOOL ANDROID_CreateWindowSurface( HWND hwnd, UINT swp_flags, const RECT *visible_rect, struct window_surface **surface ) +{ + struct android_win_data *data; + RECT surface_rect; + DWORD flags; + COLORREF key; + BYTE alpha; + BOOL layered = NtUserGetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYERED; + + TRACE( "hwnd %p, swp_flags %08x, visible %s, surface %p\n", hwnd, swp_flags, wine_dbgstr_rect( visible_rect ), surface ); + + if (!(data = get_win_data( hwnd ))) return TRUE; /* use default surface */ + if (!get_surface_rect( visible_rect, &surface_rect )) goto done; /* use default surface */ + if (data->surface) { if (!memcmp( &data->surface->rect, &surface_rect, sizeof(surface_rect) )) diff --git a/dlls/winemac.drv/gdi.c b/dlls/winemac.drv/gdi.c index 9d3c2adb26c..0b12c65303d 100644 --- a/dlls/winemac.drv/gdi.c +++ b/dlls/winemac.drv/gdi.c @@ -309,6 +309,7 @@ static const struct user_driver_funcs macdrv_funcs = .pWindowMessage = macdrv_WindowMessage, .pWindowPosChanged = macdrv_WindowPosChanged, .pWindowPosChanging = macdrv_WindowPosChanging, + .pCreateWindowSurface = macdrv_CreateWindowSurface, .pVulkanInit = macdrv_VulkanInit, .pwine_get_wgl_driver = macdrv_wine_get_wgl_driver, }; diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index 6f5af2d5f94..31835164e71 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -150,8 +150,8 @@ extern BOOL macdrv_CreateLayeredWindow(HWND hwnd, const RECT *window_rect, COLOR extern void macdrv_UpdateLayeredWindow(HWND hwnd, const RECT *window_rect, COLORREF color_key, BYTE alpha, UINT flags); extern LRESULT macdrv_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp); -extern BOOL macdrv_WindowPosChanging(HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, - RECT *visible_rect, struct window_surface **surface); +extern BOOL macdrv_WindowPosChanging(HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, RECT *visible_rect); +extern BOOL macdrv_CreateWindowSurface(HWND hwnd, UINT swp_flags, const RECT *visible_rect, struct window_surface **surface); extern void macdrv_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, const RECT *visible_rect, const RECT *valid_rects, diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 28deb0220f1..a3c13659360 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -2000,18 +2000,17 @@ static inline RECT get_surface_rect(const RECT *visible_rect) /*********************************************************************** * WindowPosChanging (MACDRV.@) */ -BOOL macdrv_WindowPosChanging(HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, - RECT *visible_rect, struct window_surface **surface) +BOOL macdrv_WindowPosChanging(HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, RECT *visible_rect) { struct macdrv_win_data *data = get_win_data(hwnd); DWORD style = NtUserGetWindowLongW(hwnd, GWL_STYLE); - RECT surface_rect; + BOOL ret = FALSE;
- TRACE("%p swp %04x window %s client %s visible %s surface %p\n", hwnd, + TRACE("%p swp %04x window %s client %s visible %s\n", hwnd, swp_flags, wine_dbgstr_rect(window_rect), wine_dbgstr_rect(client_rect), - wine_dbgstr_rect(visible_rect), surface); + wine_dbgstr_rect(visible_rect));
- if (!data && !(data = macdrv_create_win_data(hwnd, window_rect, client_rect))) return TRUE; /* use default surface */ + if (!data && !(data = macdrv_create_win_data(hwnd, window_rect, client_rect))) return FALSE; /* use default surface */
macdrv_window_to_mac_rect(data, style, visible_rect, window_rect, client_rect); TRACE("visible_rect %s -> %s\n", wine_dbgstr_rect(window_rect), @@ -2021,6 +2020,27 @@ BOOL macdrv_WindowPosChanging(HWND hwnd, UINT swp_flags, const RECT *window_rect if (swp_flags & SWP_HIDEWINDOW) goto done; /* use default surface */ if (data->ulw_layered) goto done; /* use default surface */
+ ret = TRUE; + +done: + release_win_data(data); + return ret; +} + + +/*********************************************************************** + * CreateWindowSurface (MACDRV.@) + */ +BOOL macdrv_CreateWindowSurface(HWND hwnd, UINT swp_flags, const RECT *visible_rect, struct window_surface **surface) +{ + struct macdrv_win_data *data; + DWORD style = NtUserGetWindowLongW(hwnd, GWL_STYLE); + RECT surface_rect; + + TRACE("hwnd %p, swp_flags %08x, visible %s, surface %p\n", hwnd, swp_flags, wine_dbgstr_rect(visible_rect), surface); + + if (!(data = get_win_data(hwnd))) return TRUE; /* use default surface */ + if (*surface) window_surface_release(*surface); *surface = NULL;
diff --git a/dlls/winewayland.drv/waylanddrv.h b/dlls/winewayland.drv/waylanddrv.h index 55d4860fa48..4b92c9bf1ba 100644 --- a/dlls/winewayland.drv/waylanddrv.h +++ b/dlls/winewayland.drv/waylanddrv.h @@ -337,8 +337,8 @@ void WAYLAND_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, const RECT *visible_rect, const RECT *valid_rects, struct window_surface *surface); -BOOL WAYLAND_WindowPosChanging(HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, - RECT *visible_rect, struct window_surface **surface); +BOOL WAYLAND_WindowPosChanging(HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, RECT *visible_rect); +BOOL WAYLAND_CreateWindowSurface(HWND hwnd, UINT swp_flags, const RECT *visible_rect, struct window_surface **surface); UINT WAYLAND_VulkanInit(UINT version, void *vulkan_handle, const struct vulkan_driver_funcs **driver_funcs); struct opengl_funcs *WAYLAND_wine_get_wgl_driver(UINT version);
diff --git a/dlls/winewayland.drv/waylanddrv_main.c b/dlls/winewayland.drv/waylanddrv_main.c index 61e7df16f14..47c1299dd01 100644 --- a/dlls/winewayland.drv/waylanddrv_main.c +++ b/dlls/winewayland.drv/waylanddrv_main.c @@ -47,6 +47,7 @@ static const struct user_driver_funcs waylanddrv_funcs = .pWindowMessage = WAYLAND_WindowMessage, .pWindowPosChanged = WAYLAND_WindowPosChanged, .pWindowPosChanging = WAYLAND_WindowPosChanging, + .pCreateWindowSurface = WAYLAND_CreateWindowSurface, .pVulkanInit = WAYLAND_VulkanInit, .pwine_get_wgl_driver = WAYLAND_wine_get_wgl_driver, }; diff --git a/dlls/winewayland.drv/window.c b/dlls/winewayland.drv/window.c index 031fca9e62e..c006505bc90 100644 --- a/dlls/winewayland.drv/window.c +++ b/dlls/winewayland.drv/window.c @@ -444,34 +444,50 @@ void WAYLAND_DestroyWindow(HWND hwnd) /*********************************************************************** * WAYLAND_WindowPosChanging */ -BOOL WAYLAND_WindowPosChanging(HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, - RECT *visible_rect, struct window_surface **surface) +BOOL WAYLAND_WindowPosChanging(HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, RECT *visible_rect) { struct wayland_win_data *data = wayland_win_data_get(hwnd); HWND parent; - BOOL visible; - RECT surface_rect; + BOOL visible, ret = FALSE;
TRACE("hwnd %p window %s client %s visible %s flags %08x\n", hwnd, wine_dbgstr_rect(window_rect), wine_dbgstr_rect(client_rect), wine_dbgstr_rect(visible_rect), swp_flags);
- if (!data && !(data = wayland_win_data_create(hwnd, window_rect, client_rect))) - return TRUE; - - /* Release the dummy surface wine provides for toplevels. */ - if (*surface) window_surface_release(*surface); - *surface = NULL; + if (!data && !(data = wayland_win_data_create(hwnd, window_rect, client_rect))) return FALSE; /* use default surface */
parent = NtUserGetAncestor(hwnd, GA_PARENT); visible = ((NtUserGetWindowLongW(hwnd, GWL_STYLE) & WS_VISIBLE) || (swp_flags & SWP_SHOWWINDOW)) && !(swp_flags & SWP_HIDEWINDOW);
- /* Check if we don't want a dedicated window surface. */ - if ((parent && parent != NtUserGetDesktopWindow()) || !visible) goto done; + if ((parent && parent != NtUserGetDesktopWindow()) || !visible) goto done; /* use default surface */ + + ret = TRUE; + +done: + wayland_win_data_release(data); + return ret; +} + + +/*********************************************************************** + * WAYLAND_CreateWindowSurface + */ +BOOL WAYLAND_CreateWindowSurface(HWND hwnd, UINT swp_flags, const RECT *visible_rect, struct window_surface **surface) +{ + struct wayland_win_data *data; + RECT surface_rect; + + TRACE("hwnd %p, swp_flags %08x, visible %s, surface %p\n", hwnd, swp_flags, wine_dbgstr_rect(visible_rect), surface); + + if (!(data = wayland_win_data_get(hwnd))) return TRUE; /* use default surface */ + + /* Release the dummy surface wine provides for toplevels. */ + if (*surface) window_surface_release(*surface); + *surface = NULL;
- surface_rect = *window_rect; + surface_rect = *visible_rect; OffsetRect(&surface_rect, -surface_rect.left, -surface_rect.top);
/* Check if we can reuse our current window surface. */ diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index 987e2ef38c0..ec77a232e8e 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -423,6 +423,7 @@ static const struct user_driver_funcs x11drv_funcs = .pCreateLayeredWindow = X11DRV_CreateLayeredWindow, .pWindowMessage = X11DRV_WindowMessage, .pWindowPosChanging = X11DRV_WindowPosChanging, + .pCreateWindowSurface = X11DRV_CreateWindowSurface, .pWindowPosChanged = X11DRV_WindowPosChanged, .pSystemParametersInfo = X11DRV_SystemParametersInfo, .pVulkanInit = X11DRV_VulkanInit, diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index f71b8eb8c10..1d6bf30206d 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2593,16 +2593,13 @@ static inline BOOL get_surface_rect( const RECT *visible_rect, RECT *surface_rec /*********************************************************************** * WindowPosChanging (X11DRV.@) */ -BOOL X11DRV_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, - RECT *visible_rect, struct window_surface **surface ) +BOOL X11DRV_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, RECT *visible_rect ) { struct x11drv_win_data *data = get_win_data( hwnd ); RECT surface_rect; - DWORD flags; - COLORREF key; - BOOL layered = NtUserGetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYERED; + BOOL ret = FALSE;
- if (!data && !(data = X11DRV_create_win_data( hwnd, window_rect, client_rect ))) return TRUE; /* use default surface */ + if (!data && !(data = X11DRV_create_win_data( hwnd, window_rect, client_rect ))) return FALSE; /* use default surface */
/* check if we need to switch the window to managed */ if (!data->managed && data->whole_window && is_window_managed( hwnd, swp_flags, window_rect )) @@ -2610,7 +2607,7 @@ BOOL X11DRV_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rec TRACE( "making win %p/%lx managed\n", hwnd, data->whole_window ); release_win_data( data ); unmap_window( hwnd ); - if (!(data = get_win_data( hwnd ))) return TRUE; /* use default surface */ + if (!(data = get_win_data( hwnd ))) return FALSE; /* use default surface */ data->managed = TRUE; }
@@ -2621,6 +2618,29 @@ BOOL X11DRV_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rec if (data->use_alpha) goto done; /* use default surface */ if (!get_surface_rect( visible_rect, &surface_rect )) goto done; /* use default surface */
+ ret = TRUE; + +done: + release_win_data( data ); + return ret; +} + + +/*********************************************************************** + * CreateWindowSurface (X11DRV.@) + */ +BOOL X11DRV_CreateWindowSurface( HWND hwnd, UINT swp_flags, const RECT *visible_rect, struct window_surface **surface ) +{ + struct x11drv_win_data *data; + RECT surface_rect; + DWORD flags; + COLORREF key; + BOOL layered = NtUserGetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYERED; + + TRACE( "hwnd %p, swp_flags %08x, visible %s, surface %p\n", hwnd, swp_flags, wine_dbgstr_rect( visible_rect ), surface ); + + if (!(data = get_win_data( hwnd ))) return TRUE; /* use default surface */ + if (*surface) window_surface_release( *surface ); *surface = NULL; /* indicate that we want to draw directly to the window */
@@ -2629,6 +2649,7 @@ BOOL X11DRV_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rec if (data->client_window) goto done; /* draw directly to the window */ if (!client_side_graphics && !layered) goto done; /* draw directly to the window */
+ if (!get_surface_rect( visible_rect, &surface_rect )) goto done; if (data->surface) { if (EqualRect( &data->surface->rect, &surface_rect )) diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 2704bfd5948..c16423b3cf0 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -243,8 +243,8 @@ extern void X11DRV_UpdateClipboard(void); extern BOOL X11DRV_CreateLayeredWindow( HWND hwnd, const RECT *window_rect, COLORREF color_key, struct window_surface **surface ); extern LRESULT X11DRV_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ); -extern BOOL X11DRV_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, - RECT *visible_rect, struct window_surface **surface ); +extern BOOL X11DRV_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, RECT *visible_rect ); +extern BOOL X11DRV_CreateWindowSurface( HWND hwnd, UINT swp_flags, const RECT *visible_rect, struct window_surface **surface ); extern void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, const RECT *rectWindow, const RECT *rectClient, const RECT *visible_rect, const RECT *valid_rects, diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 5f77b4624d3..5ee77e25f28 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -337,8 +337,8 @@ struct user_driver_funcs BOOL (*pCreateLayeredWindow)(HWND,const RECT *,COLORREF,struct window_surface **); void (*pUpdateLayeredWindow)(HWND,const RECT *,COLORREF,BYTE,UINT); LRESULT (*pWindowMessage)(HWND,UINT,WPARAM,LPARAM); - BOOL (*pWindowPosChanging)(HWND,UINT,const RECT *,const RECT *,RECT *, - struct window_surface**); + BOOL (*pWindowPosChanging)(HWND,UINT,const RECT *,const RECT *,RECT *); + BOOL (*pCreateWindowSurface)(HWND,UINT,const RECT *,struct window_surface**); void (*pWindowPosChanged)(HWND,HWND,UINT,const RECT *,const RECT *,const RECT *, const RECT *,struct window_surface*); /* system parameters */
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winex11.drv/init.c | 1 + dlls/winex11.drv/window.c | 20 +++++++++++++++++--- dlls/winex11.drv/x11drv.h | 2 ++ 3 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index ec77a232e8e..28729d1c14b 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -421,6 +421,7 @@ static const struct user_driver_funcs x11drv_funcs = .pClipboardWindowProc = X11DRV_ClipboardWindowProc, .pUpdateClipboard = X11DRV_UpdateClipboard, .pCreateLayeredWindow = X11DRV_CreateLayeredWindow, + .pUpdateLayeredWindow = X11DRV_UpdateLayeredWindow, .pWindowMessage = X11DRV_WindowMessage, .pWindowPosChanging = X11DRV_WindowPosChanging, .pCreateWindowSurface = X11DRV_CreateWindowSurface, diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 1d6bf30206d..74a9a4f6d68 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2991,7 +2991,6 @@ BOOL X11DRV_CreateLayeredWindow( HWND hwnd, const RECT *window_rect, COLORREF co { struct window_surface *surface; struct x11drv_win_data *data; - BOOL mapped; RECT rect;
if (!(data = get_win_data( hwnd ))) return FALSE; @@ -3013,6 +3012,22 @@ BOOL X11DRV_CreateLayeredWindow( HWND hwnd, const RECT *window_rect, COLORREF co else set_surface_color_key( surface, color_key );
if ((*window_surface = surface)) window_surface_add_ref( surface ); + release_win_data( data ); + + return TRUE; +} + + +/*********************************************************************** + * UpdateLayeredWindow (X11DRV.@) + */ +void X11DRV_UpdateLayeredWindow( HWND hwnd, const RECT *window_rect, COLORREF color_key, + BYTE alpha, UINT flags ) +{ + struct x11drv_win_data *data; + BOOL mapped; + + if (!(data = get_win_data( hwnd ))) return; mapped = data->mapped; release_win_data( data );
@@ -3024,10 +3039,9 @@ BOOL X11DRV_CreateLayeredWindow( HWND hwnd, const RECT *window_rect, COLORREF co if ((style & WS_VISIBLE) && ((style & WS_MINIMIZE) || is_window_rect_mapped( window_rect ))) map_window( hwnd, style ); } - - return TRUE; }
+ /* Add a window to taskbar */ static void taskbar_add_tab( HWND hwnd ) { diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index c16423b3cf0..49fb17fc7cd 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -242,6 +242,8 @@ extern LRESULT X11DRV_ClipboardWindowProc( HWND hwnd, UINT msg, WPARAM wp, LPARA extern void X11DRV_UpdateClipboard(void); extern BOOL X11DRV_CreateLayeredWindow( HWND hwnd, const RECT *window_rect, COLORREF color_key, struct window_surface **surface ); +extern void X11DRV_UpdateLayeredWindow( HWND hwnd, const RECT *window_rect, COLORREF color_key, + BYTE alpha, UINT flags ); extern LRESULT X11DRV_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ); extern BOOL X11DRV_WindowPosChanging( HWND hwnd, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, RECT *visible_rect ); extern BOOL X11DRV_CreateWindowSurface( HWND hwnd, UINT swp_flags, const RECT *visible_rect, struct window_surface **surface );
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winemac.drv/window.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index a3c13659360..012189249a4 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -1925,10 +1925,6 @@ BOOL macdrv_CreateLayeredWindow(HWND hwnd, const RECT *window_rect, COLORREF col
if ((*window_surface = surface)) window_surface_add_ref(surface);
- /* Since layered attributes are now set, can now show the window */ - if (data->cocoa_window && !data->on_screen && NtUserGetWindowLongW(hwnd, GWL_STYLE) & WS_VISIBLE) - show_window(data); - release_win_data(data);
return TRUE; @@ -1944,6 +1940,10 @@ void macdrv_UpdateLayeredWindow(HWND hwnd, const RECT *window_rect, COLORREF col
if ((data = get_win_data(hwnd))) { + /* Since layered attributes are now set, can now show the window */ + if (data->cocoa_window && !data->on_screen && NtUserGetWindowLongW(hwnd, GWL_STYLE) & WS_VISIBLE) + show_window(data); + /* The ULW flags are a superset of the LWA flags. */ sync_window_opacity(data, color_key, 255, TRUE, flags); release_win_data(data);
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=146235
Your paranoid android.
=== debian11b (64 bit WoW report) ===
user32: msg.c:6933: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got hook 0x0005 instead msg.c:6933: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got winevent_hook 0x0003 instead msg.c:6933: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x030f instead msg.c:6933: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x001c instead msg.c:6933: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x0086 instead msg.c:6933: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x0006 instead msg.c:6933: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got hook 0x0009 instead
This merge request was approved by Huw Davies.