From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/driver.c | 5 ++--- dlls/win32u/window.c | 3 +-- dlls/wineandroid.drv/android.h | 5 ++--- dlls/wineandroid.drv/window.c | 18 ++++++++---------- dlls/winemac.drv/macdrv.h | 5 ++--- dlls/winemac.drv/window.c | 17 +++++++---------- dlls/winewayland.drv/waylanddrv.h | 5 ++--- dlls/winewayland.drv/window.c | 17 +++++++---------- dlls/winex11.drv/window.c | 23 +++++++++++------------ dlls/winex11.drv/x11drv.h | 5 ++--- include/wine/gdi_driver.h | 5 ++--- 11 files changed, 46 insertions(+), 62 deletions(-)
diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c index a3ad2c49501..6da282b1dab 100644 --- a/dlls/win32u/driver.c +++ b/dlls/win32u/driver.c @@ -891,9 +891,8 @@ static void nulldrv_MoveWindowBits( HWND hwnd, const RECT *window_rect, const RE { }
-static void nulldrv_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, - const RECT *window_rect, const RECT *client_rect, - const RECT *visible_rect, struct window_surface *surface ) +static void nulldrv_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, const struct window_rects *new_rects, + struct window_surface *surface ) { }
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 269dbce3f3d..819efab798b 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -2036,8 +2036,7 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, stru user_driver->pMoveWindowBits( hwnd, &new_rects->window, &new_rects->client, &new_rects->visible, valid_rects ); }
- user_driver->pWindowPosChanged( hwnd, insert_after, swp_flags, &new_rects->window, - &new_rects->client, &new_rects->visible, new_surface ); + user_driver->pWindowPosChanged( hwnd, insert_after, swp_flags, new_rects, new_surface ); }
return ret; diff --git a/dlls/wineandroid.drv/android.h b/dlls/wineandroid.drv/android.h index 4e2465e5e7c..18aa1ef738d 100644 --- a/dlls/wineandroid.drv/android.h +++ b/dlls/wineandroid.drv/android.h @@ -100,9 +100,8 @@ extern LRESULT ANDROID_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp extern BOOL ANDROID_WindowPosChanging( HWND hwnd, UINT swp_flags, BOOL shaped, const RECT *window_rect, const RECT *client_rect, RECT *visible_rect ); extern BOOL ANDROID_CreateWindowSurface( HWND hwnd, BOOL layered, const RECT *surface_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, struct window_surface *surface ); +extern void ANDROID_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, const struct window_rects *new_rects, + struct window_surface *surface );
/* unixlib interface */
diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c index 6e3c11d5027..9f1a7a6ab82 100644 --- a/dlls/wineandroid.drv/window.c +++ b/dlls/wineandroid.drv/window.c @@ -1079,9 +1079,8 @@ BOOL ANDROID_CreateWindowSurface( HWND hwnd, BOOL layered, const RECT *surface_r /*********************************************************************** * ANDROID_WindowPosChanged */ -void ANDROID_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, - const RECT *window_rect, const RECT *client_rect, - const RECT *visible_rect, struct window_surface *surface ) +void ANDROID_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, const struct window_rects *new_rects, + struct window_surface *surface ) { struct android_win_data *data; UINT new_style = NtUserGetWindowLongW( hwnd, GWL_STYLE ); @@ -1089,9 +1088,9 @@ void ANDROID_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
if (!(data = get_win_data( hwnd ))) return;
- data->window_rect = *window_rect; - data->whole_rect = *visible_rect; - data->client_rect = *client_rect; + data->window_rect = new_rects->window; + data->whole_rect = new_rects->visible; + data->client_rect = new_rects->client;
if (!is_argb_surface( data->surface )) { @@ -1104,11 +1103,10 @@ void ANDROID_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
if (!(swp_flags & SWP_NOZORDER)) insert_after = NtUserGetWindowRelative( hwnd, GW_HWNDPREV );
- TRACE( "win %p window %s client %s style %08x owner %p after %p flags %08x\n", hwnd, - wine_dbgstr_rect(window_rect), wine_dbgstr_rect(client_rect), - new_style, owner, insert_after, swp_flags ); + TRACE( "win %p new_rects %s style %08x owner %p after %p flags %08x\n", hwnd, + debugstr_window_rects(new_rects), new_style, owner, insert_after, swp_flags );
- ioctl_window_pos_changed( hwnd, window_rect, client_rect, visible_rect, + ioctl_window_pos_changed( hwnd, &new_rects->window, &new_rects->client, &new_rects->visible, new_style, swp_flags, insert_after, owner ); }
diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index 04b090ea6a5..b7d8f6b1a60 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -152,9 +152,8 @@ extern BOOL macdrv_WindowPosChanging(HWND hwnd, UINT swp_flags, BOOL shaped, con extern BOOL macdrv_CreateWindowSurface(HWND hwnd, BOOL layered, const RECT *surface_rect, struct window_surface **surface); extern void macdrv_MoveWindowBits(HWND hwnd, const RECT *window_rect, const RECT *client_rect, const RECT *visible_rect, const RECT *valid_rects); -extern void macdrv_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags, - const RECT *window_rect, const RECT *client_rect, - const RECT *visible_rect, struct window_surface *surface); +extern void macdrv_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags, const struct window_rects *new_rects, + struct window_surface *surface); extern void macdrv_DestroyCursorIcon(HCURSOR cursor); extern BOOL macdrv_GetCursorPos(LPPOINT pos); extern void macdrv_SetCapture(HWND hwnd, UINT flags); diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index d665eb97e50..5cca10c567f 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -1923,9 +1923,8 @@ void macdrv_MoveWindowBits(HWND hwnd, const RECT *window_rect, const RECT *clien /*********************************************************************** * WindowPosChanged (MACDRV.@) */ -void macdrv_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags, - const RECT *window_rect, const RECT *client_rect, - const RECT *visible_rect, struct window_surface *surface) +void macdrv_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags, const struct window_rects *new_rects, + struct window_surface *surface) { struct macdrv_thread_data *thread_data; struct macdrv_win_data *data; @@ -1939,9 +1938,9 @@ void macdrv_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags, old_window_rect = data->window_rect; old_whole_rect = data->whole_rect; old_client_rect = data->client_rect; - data->window_rect = *window_rect; - data->whole_rect = *visible_rect; - data->client_rect = *client_rect; + data->window_rect = new_rects->window; + data->whole_rect = new_rects->visible; + data->client_rect = new_rects->client; if (data->cocoa_window && !data->ulw_layered) { if (surface) window_surface_add_ref(surface); @@ -1965,10 +1964,8 @@ void macdrv_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags, data->surface = surface; }
- TRACE("win %p/%p window %s whole %s client %s style %08x flags %08x surface %p\n", - hwnd, data->cocoa_window, wine_dbgstr_rect(window_rect), - wine_dbgstr_rect(visible_rect), wine_dbgstr_rect(client_rect), - new_style, swp_flags, surface); + TRACE("win %p/%p new_rects %s style %08x flags %08x surface %p\n", hwnd, data->cocoa_window, + debugstr_window_rects(new_rects), new_style, swp_flags, surface);
sync_gl_view(data, &old_whole_rect, &old_client_rect);
diff --git a/dlls/winewayland.drv/waylanddrv.h b/dlls/winewayland.drv/waylanddrv.h index 6a2aa0100ab..bb24837766b 100644 --- a/dlls/winewayland.drv/waylanddrv.h +++ b/dlls/winewayland.drv/waylanddrv.h @@ -356,9 +356,8 @@ void WAYLAND_SetWindowText(HWND hwnd, LPCWSTR text); LRESULT WAYLAND_SysCommand(HWND hwnd, WPARAM wparam, LPARAM lparam); UINT WAYLAND_UpdateDisplayDevices(const struct gdi_device_manager *device_manager, void *param); LRESULT WAYLAND_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp); -void WAYLAND_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags, - const RECT *window_rect, const RECT *client_rect, - const RECT *visible_rect, struct window_surface *surface); +void WAYLAND_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags, const struct window_rects *new_rects, + struct window_surface *surface); BOOL WAYLAND_WindowPosChanging(HWND hwnd, UINT swp_flags, BOOL shaped, const RECT *window_rect, const RECT *client_rect, RECT *visible_rect); BOOL WAYLAND_CreateWindowSurface(HWND hwnd, BOOL layered, const RECT *surface_rect, struct window_surface **surface); diff --git a/dlls/winewayland.drv/window.c b/dlls/winewayland.drv/window.c index fe9bc4382b5..9f91fafa721 100644 --- a/dlls/winewayland.drv/window.c +++ b/dlls/winewayland.drv/window.c @@ -446,33 +446,30 @@ BOOL WAYLAND_WindowPosChanging(HWND hwnd, UINT swp_flags, BOOL shaped, const REC /*********************************************************************** * WAYLAND_WindowPosChanged */ -void WAYLAND_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags, - const RECT *window_rect, const RECT *client_rect, - const RECT *visible_rect, struct window_surface *surface) +void WAYLAND_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags, const struct window_rects *new_rects, + struct window_surface *surface) { struct wayland_win_data *data; BOOL managed;
- TRACE("hwnd %p window %s client %s visible %s after %p flags %08x\n", - hwnd, wine_dbgstr_rect(window_rect), wine_dbgstr_rect(client_rect), - wine_dbgstr_rect(visible_rect), insert_after, swp_flags); + TRACE("hwnd %p new_rects %s after %p flags %08x\n", hwnd, debugstr_window_rects(new_rects), insert_after, swp_flags);
/* Get the managed state with win_data unlocked, as is_window_managed * may need to query win_data information about other HWNDs and thus * acquire the lock itself internally. */ - managed = is_window_managed(hwnd, swp_flags, window_rect); + managed = is_window_managed(hwnd, swp_flags, &new_rects->window);
if (!(data = wayland_win_data_get(hwnd))) return;
- data->window_rect = *window_rect; - data->client_rect = *client_rect; + data->window_rect = new_rects->window; + data->client_rect = new_rects->client; data->managed = managed;
if (surface) window_surface_add_ref(surface); if (data->window_surface) window_surface_release(data->window_surface); data->window_surface = surface;
- wayland_win_data_update_wayland_surface(data, visible_rect); + wayland_win_data_update_wayland_surface(data, &new_rects->visible); if (data->wayland_surface) wayland_win_data_update_wayland_state(data);
wayland_win_data_release(data); diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index e91801a774d..5b10a577541 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2654,9 +2654,8 @@ void X11DRV_MoveWindowBits( HWND hwnd, const RECT *window_rect, const RECT *clie /*********************************************************************** * WindowPosChanged (X11DRV.@) */ -void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, - const RECT *rectWindow, const RECT *rectClient, - const RECT *visible_rect, struct window_surface *surface ) +void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, const struct window_rects *new_rects, + struct window_surface *surface ) { struct x11drv_thread_data *thread_data; struct x11drv_win_data *data; @@ -2671,9 +2670,9 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, old_window_rect = data->window_rect; old_whole_rect = data->whole_rect; old_client_rect = data->client_rect; - data->window_rect = *rectWindow; - data->whole_rect = *visible_rect; - data->client_rect = *rectClient; + data->window_rect = new_rects->window; + data->whole_rect = new_rects->visible; + data->client_rect = new_rects->client; if (data->vis.visualid == default_visual.visualid) { if (surface) window_surface_add_ref( surface ); @@ -2681,8 +2680,8 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, data->surface = surface; }
- TRACE( "win %p window %s client %s style %08x flags %08x\n", - hwnd, wine_dbgstr_rect(rectWindow), wine_dbgstr_rect(rectClient), new_style, swp_flags ); + TRACE( "win %p/%lx new_rects %s style %08x flags %08x\n", hwnd, data->whole_window, + debugstr_window_rects(new_rects), new_style, swp_flags );
XFlush( gdi_display ); /* make sure painting is done before we move the window */
@@ -2716,7 +2715,7 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, { if (((swp_flags & SWP_HIDEWINDOW) && !(new_style & WS_VISIBLE)) || (!event_type && !(new_style & WS_MINIMIZE) && - !is_window_rect_mapped( rectWindow ) && is_window_rect_mapped( &old_window_rect ))) + !is_window_rect_mapped( &new_rects->window ) && is_window_rect_mapped( &old_window_rect ))) { release_win_data( data ); unmap_window( hwnd ); @@ -2732,7 +2731,7 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, sync_window_position( data, swp_flags, &old_window_rect, &old_whole_rect, &old_client_rect );
if ((new_style & WS_VISIBLE) && - ((new_style & WS_MINIMIZE) || is_window_rect_mapped( rectWindow ))) + ((new_style & WS_MINIMIZE) || is_window_rect_mapped( &new_rects->window ))) { if (!data->mapped) { @@ -2741,7 +2740,7 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
/* layered windows are mapped only once their attributes are set */ if (NtUserGetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYERED) - needs_map = data->layered || IsRectEmpty( rectWindow ); + needs_map = data->layered || IsRectEmpty( &new_rects->window ); release_win_data( data ); if (needs_icon) fetch_icon_data( hwnd, 0, 0 ); if (needs_map) map_window( hwnd, new_style ); @@ -2754,7 +2753,7 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, TRACE( "changing win %p iconic state to %u\n", data->hwnd, data->iconic ); if (data->iconic) XIconifyWindow( data->display, data->whole_window, data->vis.screen ); - else if (is_window_rect_mapped( rectWindow )) + else if (is_window_rect_mapped( &new_rects->window )) XMapWindow( data->display, data->whole_window ); update_net_wm_states( data ); } diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 17cf8000ece..90b29a18d38 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -247,9 +247,8 @@ extern BOOL X11DRV_WindowPosChanging( HWND hwnd, UINT swp_flags, BOOL shaped, co extern BOOL X11DRV_CreateWindowSurface( HWND hwnd, BOOL layered, const RECT *surface_rect, struct window_surface **surface ); extern void X11DRV_MoveWindowBits( HWND hwnd, const RECT *window_rect, const RECT *client_rect, const RECT *visible_rect, const RECT *valid_rects ); -extern void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, - const RECT *window_rect, const RECT *client_rect, - const RECT *visible_rect, struct window_surface *surface ); +extern void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, const struct window_rects *new_rects, + struct window_surface *surface ); extern BOOL X11DRV_SystemParametersInfo( UINT action, UINT int_param, void *ptr_param, UINT flags ); extern void X11DRV_ThreadDetach(void); diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 7c19895dd23..d102878a52e 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -193,7 +193,7 @@ struct gdi_dc_funcs };
/* increment this when you change the DC function table */ -#define WINE_GDI_DRIVER_VERSION 90 +#define WINE_GDI_DRIVER_VERSION 91
#define GDI_PRIORITY_NULL_DRV 0 /* null driver */ #define GDI_PRIORITY_FONT_DRV 100 /* any font driver */ @@ -361,8 +361,7 @@ struct user_driver_funcs BOOL (*pWindowPosChanging)(HWND,UINT,BOOL,const RECT *,const RECT *,RECT *); BOOL (*pCreateWindowSurface)(HWND,BOOL,const RECT *,struct window_surface**); void (*pMoveWindowBits)(HWND,const RECT *,const RECT *,const RECT *,const RECT *); - void (*pWindowPosChanged)(HWND,HWND,UINT,const RECT *,const RECT *,const RECT *, - struct window_surface*); + void (*pWindowPosChanged)(HWND,HWND,UINT,const struct window_rects*,struct window_surface*); /* system parameters */ BOOL (*pSystemParametersInfo)(UINT,UINT,void*,UINT); /* vulkan support */