-- v2: win32u: Move desktop resize on WM_DISPLAYCHANGE out of the drivers. win32u: Send display change messages when host display mode changes. win32u: Fix a restorer_str typo. winemac: Merge RESET_DEVICE_METRICS and DISPLAYCHANGE internal messages.
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winemac.drv/macdrv.h | 1 - dlls/winemac.drv/window.c | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index a7905050f16..ab5b9a2667b 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -95,7 +95,6 @@ static inline RECT rect_from_cgrect(CGRect cgrect) enum macdrv_window_messages { WM_MACDRV_SET_WIN_REGION = WM_WINE_FIRST_DRIVER_MSG, - WM_MACDRV_RESET_DEVICE_METRICS, WM_MACDRV_DISPLAYCHANGE, WM_MACDRV_ACTIVATE_ON_FOLLOWING_FOCUS, }; diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 84668b44c51..35cf9255279 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -1586,8 +1586,6 @@ void macdrv_resize_desktop(void) if (!NtUserGetWindowRect(hwnd, ¤t_desktop_rect) || !CGRectEqualToRect(cgrect_from_rect(current_desktop_rect), new_desktop_rect)) { - send_message_timeout(HWND_BROADCAST, WM_MACDRV_RESET_DEVICE_METRICS, 0, 0, - SMTO_ABORTIFHUNG, 2000, NULL); NtUserSetWindowPos(hwnd, 0, CGRectGetMinX(new_desktop_rect), CGRectGetMinY(new_desktop_rect), CGRectGetWidth(new_desktop_rect), CGRectGetHeight(new_desktop_rect), SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE); @@ -2020,10 +2018,8 @@ LRESULT macdrv_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) release_win_data(data); } return 0; - case WM_MACDRV_RESET_DEVICE_METRICS: - macdrv_reset_device_metrics(); - return 0; case WM_MACDRV_DISPLAYCHANGE: + macdrv_reset_device_metrics(); macdrv_reassert_window_position(hwnd); return 0; case WM_MACDRV_ACTIVATE_ON_FOLLOWING_FOCUS:
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/sysparams.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 49bf26214e7..1488e87e31b 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -3208,7 +3208,7 @@ static LONG apply_display_settings( struct source *target, const DEVMODEW *devmo { static const WCHAR restorerW[] = {'_','_','w','i','n','e','_','d','i','s','p','l','a','y','_', 's','e','t','t','i','n','g','s','_','r','e','s','t','o','r','e','r',0}; - UNICODE_STRING restoter_str = RTL_CONSTANT_STRING( restorerW ); + UNICODE_STRING restorer_str = RTL_CONSTANT_STRING( restorerW ); WCHAR primary_name[CCHDEVICENAME]; struct source *primary, *source; DEVMODEW *mode, *displays; @@ -3261,7 +3261,7 @@ static LONG apply_display_settings( struct source *target, const DEVMODEW *devmo free( displays ); if (ret) return ret;
- if ((restorer_window = NtUserFindWindowEx( NULL, NULL, &restoter_str, NULL, 0 ))) + if ((restorer_window = NtUserFindWindowEx( NULL, NULL, &restorer_str, NULL, 0 ))) { if (NtUserGetWindowThread( restorer_window, NULL ) != GetCurrentThreadId()) {
From: Rémi Bernon rbernon@codeweavers.com
Similarly to when it is changed from an application call, but avoid broadcasting WM_DISPLAYCHANGE to all windows when called from the drivers, as we may have done it already. --- dlls/win32u/sysparams.c | 70 ++++++++++++++++++++++++----------- dlls/wineandroid.drv/init.c | 2 +- dlls/winemac.drv/display.c | 5 +-- dlls/winewayland.drv/window.c | 3 +- dlls/winex11.drv/xrandr.c | 5 +-- include/ntuser.h | 2 +- 6 files changed, 53 insertions(+), 34 deletions(-)
diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 1488e87e31b..db23795d57c 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -3203,6 +3203,50 @@ static BOOL all_detached_settings( const DEVMODEW *displays ) return TRUE; }
+static BOOL get_primary_source_mode( DEVMODEW *mode ) +{ + struct source *primary; + BOOL ret; + + if (!(primary = find_source( NULL ))) return FALSE; + ret = source_get_current_settings( primary, mode ); + source_release( primary ); + + return ret; +} + +static void display_mode_changed( BOOL broadcast ) +{ + DEVMODEW current_mode = {.dmSize = sizeof(DEVMODEW)}; + + if (!update_display_cache( TRUE )) + { + ERR( "Failed to update display cache after mode change.\n" ); + return; + } + if (!get_primary_source_mode( ¤t_mode )) + { + ERR( "Failed to get primary source current display settings.\n" ); + return; + } + + if (!broadcast) + send_message( get_desktop_window(), WM_DISPLAYCHANGE, current_mode.dmBitsPerPel, + MAKELPARAM( current_mode.dmPelsWidth, current_mode.dmPelsHeight ) ); + else + { + /* broadcast to all the windows as well if an application changed the display settings */ + NtUserClipCursor( NULL ); + send_notify_message( get_desktop_window(), WM_DISPLAYCHANGE, current_mode.dmBitsPerPel, + MAKELPARAM( current_mode.dmPelsWidth, current_mode.dmPelsHeight ), FALSE ); + send_message_timeout( HWND_BROADCAST, WM_DISPLAYCHANGE, current_mode.dmBitsPerPel, + MAKELPARAM( current_mode.dmPelsWidth, current_mode.dmPelsHeight ), + SMTO_ABORTIFHUNG, 2000, FALSE ); + /* post clip_fullscreen_window request to the foreground window */ + NtUserPostMessage( NtUserGetForegroundWindow(), WM_WINE_CLIPCURSOR, SET_CURSOR_FSCLIP, 0 ); + } +} + static LONG apply_display_settings( struct source *target, const DEVMODEW *devmode, HWND hwnd, DWORD flags, void *lparam ) { @@ -3270,26 +3314,7 @@ static LONG apply_display_settings( struct source *target, const DEVMODEW *devmo } }
- if (!update_display_cache( TRUE )) - WARN( "Failed to update display cache after mode change.\n" ); - - if ((source = find_source( NULL ))) - { - DEVMODEW current_mode = {.dmSize = sizeof(DEVMODEW)}; - - if (!source_get_current_settings( source, ¤t_mode )) WARN( "Failed to get primary source current display settings.\n" ); - source_release( source ); - - NtUserClipCursor( NULL ); - send_notify_message( NtUserGetDesktopWindow(), WM_DISPLAYCHANGE, current_mode.dmBitsPerPel, - MAKELPARAM( current_mode.dmPelsWidth, current_mode.dmPelsHeight ), FALSE ); - send_message_timeout( HWND_BROADCAST, WM_DISPLAYCHANGE, current_mode.dmBitsPerPel, - MAKELPARAM( current_mode.dmPelsWidth, current_mode.dmPelsHeight ), - SMTO_ABORTIFHUNG, 2000, FALSE ); - /* post clip_fullscreen_window request to the foreground window */ - NtUserPostMessage( NtUserGetForegroundWindow(), WM_WINE_CLIPCURSOR, SET_CURSOR_FSCLIP, 0 ); - } - + display_mode_changed( TRUE ); return ret; }
@@ -6306,8 +6331,9 @@ ULONG_PTR WINAPI NtUserCallNoParam( ULONG code ) case NtUserCallNoParam_ReleaseCapture: return release_capture();
- case NtUserCallNoParam_UpdateDisplayCache: - return update_display_cache( TRUE ); + case NtUserCallNoParam_DisplayModeChanged: + display_mode_changed( FALSE ); + return TRUE;
/* temporary exports */ case NtUserExitingThread: diff --git a/dlls/wineandroid.drv/init.c b/dlls/wineandroid.drv/init.c index 5b4ec59d2fa..cc01852d87f 100644 --- a/dlls/wineandroid.drv/init.c +++ b/dlls/wineandroid.drv/init.c @@ -84,7 +84,7 @@ void init_monitors( int width, int height ) wine_dbgstr_rect( &rect ), wine_dbgstr_rect( &monitor_rc_work ));
/* if we're notified from Java thread, update registry */ - if (*p_java_vm) NtUserCallNoParam( NtUserCallNoParam_UpdateDisplayCache ); + if (*p_java_vm) NtUserCallNoParam( NtUserCallNoParam_DisplayModeChanged ); }
diff --git a/dlls/winemac.drv/display.c b/dlls/winemac.drv/display.c index 49ea924e5cb..4a9e9ab721e 100644 --- a/dlls/winemac.drv/display.c +++ b/dlls/winemac.drv/display.c @@ -1112,10 +1112,7 @@ void macdrv_displays_changed(const macdrv_event *event) process it (by sending it to the desktop window). */ if (event->displays_changed.activating || NtUserGetWindowThread(hwnd, NULL) == GetCurrentThreadId()) - { - NtUserCallNoParam(NtUserCallNoParam_UpdateDisplayCache); - macdrv_resize_desktop(); - } + NtUserCallNoParam(NtUserCallNoParam_DisplayModeChanged); }
UINT macdrv_UpdateDisplayDevices(const struct gdi_device_manager *device_manager, void *param) diff --git a/dlls/winewayland.drv/window.c b/dlls/winewayland.drv/window.c index 3706b6afb97..dd023fc96a7 100644 --- a/dlls/winewayland.drv/window.c +++ b/dlls/winewayland.drv/window.c @@ -633,8 +633,7 @@ LRESULT WAYLAND_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) switch (msg) { case WM_WAYLAND_INIT_DISPLAY_DEVICES: - NtUserCallNoParam(NtUserCallNoParam_UpdateDisplayCache); - wayland_resize_desktop(); + NtUserCallNoParam(NtUserCallNoParam_DisplayModeChanged); return 0; case WM_WAYLAND_CONFIGURE: wayland_configure_window(hwnd); diff --git a/dlls/winex11.drv/xrandr.c b/dlls/winex11.drv/xrandr.c index 9a4284f493f..74b975e8671 100644 --- a/dlls/winex11.drv/xrandr.c +++ b/dlls/winex11.drv/xrandr.c @@ -1180,10 +1180,7 @@ static BOOL xrandr14_device_change_handler( HWND hwnd, XEvent *event )
xrandr14_invalidate_current_mode_cache(); if (hwnd == NtUserGetDesktopWindow() && NtUserGetWindowThread( hwnd, NULL ) == GetCurrentThreadId()) - { - NtUserCallNoParam( NtUserCallNoParam_UpdateDisplayCache ); - X11DRV_resize_desktop(); - } + NtUserCallNoParam( NtUserCallNoParam_DisplayModeChanged ); /* Update xinerama monitors for xinerama_get_fullscreen_monitors() */ rect = get_host_primary_monitor_rect(); xinerama_init( rect.right - rect.left, rect.bottom - rect.top ); diff --git a/include/ntuser.h b/include/ntuser.h index ff45ffa2bc8..e22de3023d3 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -833,7 +833,7 @@ enum NtUserCallNoParam_GetShellWindow, NtUserCallNoParam_GetTaskmanWindow, NtUserCallNoParam_ReleaseCapture, - NtUserCallNoParam_UpdateDisplayCache, + NtUserCallNoParam_DisplayModeChanged, /* temporary exports */ NtUserExitingThread, NtUserThreadDetach,
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/defwnd.c | 27 ++++++++++++++++++++++++++- dlls/wineandroid.drv/window.c | 5 ----- dlls/winemac.drv/macdrv.h | 2 -- dlls/winemac.drv/window.c | 24 +----------------------- dlls/winewayland.drv/window.c | 17 ----------------- dlls/winex11.drv/desktop.c | 22 ---------------------- dlls/winex11.drv/window.c | 5 +---- dlls/winex11.drv/x11drv.h | 2 -- include/ntuser.h | 1 + 9 files changed, 29 insertions(+), 76 deletions(-)
diff --git a/dlls/win32u/defwnd.c b/dlls/win32u/defwnd.c index 43d31bc4f54..b0a5af26d2b 100644 --- a/dlls/win32u/defwnd.c +++ b/dlls/win32u/defwnd.c @@ -2979,7 +2979,32 @@ LRESULT desktop_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ) case WM_NCCALCSIZE: return 0; case WM_DISPLAYCHANGE: - return user_driver->pDesktopWindowProc( hwnd, msg, wparam, lparam ); + { + static RECT virtual_rect; + + RECT new_rect = NtUserGetVirtualScreenRect(), old_rect = virtual_rect; + UINT context, flags = 0; + + if (EqualRect( &new_rect, &old_rect )) return TRUE; + virtual_rect = new_rect; + + TRACE( "desktop %p change from %s to %s\n", hwnd, wine_dbgstr_rect( &old_rect ), wine_dbgstr_rect( &new_rect ) ); + + if (new_rect.right - new_rect.left == old_rect.right - old_rect.left && + new_rect.bottom - new_rect.top == old_rect.bottom - old_rect.top) + flags |= SWP_NOSIZE; + if (new_rect.left == old_rect.left && new_rect.top == old_rect.top) + flags |= SWP_NOMOVE; + + context = NtUserSetThreadDpiAwarenessContext( NTUSER_DPI_PER_MONITOR_AWARE ); + NtUserSetWindowPos( hwnd, 0, new_rect.left, new_rect.top, + new_rect.right - new_rect.left, new_rect.bottom - new_rect.top, + flags | SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE ); + NtUserSetThreadDpiAwarenessContext( context ); + + return send_message_timeout( HWND_BROADCAST, WM_WINE_DESKTOP_RESIZED, old_rect.left, + old_rect.top, SMTO_ABORTIFHUNG, 2000, FALSE ); + } default: if (msg >= WM_USER && hwnd == get_desktop_window()) return user_driver->pDesktopWindowProc( hwnd, msg, wparam, lparam ); diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c index de1de330181..f06e1701631 100644 --- a/dlls/wineandroid.drv/window.c +++ b/dlls/wineandroid.drv/window.c @@ -416,7 +416,6 @@ static void pull_events(void) */ static int process_events( DWORD mask ) { - UINT context; struct java_event *event, *next, *previous; unsigned int count = 0;
@@ -457,13 +456,9 @@ static int process_events( DWORD mask ) { case DESKTOP_CHANGED: TRACE( "DESKTOP_CHANGED %ux%u\n", event->data.desktop.width, event->data.desktop.height ); - context = NtUserSetThreadDpiAwarenessContext( NTUSER_DPI_PER_MONITOR_AWARE ); screen_width = event->data.desktop.width; screen_height = event->data.desktop.height; init_monitors( screen_width, screen_height ); - NtUserSetWindowPos( NtUserGetDesktopWindow(), 0, 0, 0, screen_width, screen_height, - SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW ); - NtUserSetThreadDpiAwarenessContext( context ); break;
case CONFIG_CHANGED: diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index ab5b9a2667b..68e20bbf5db 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -95,7 +95,6 @@ static inline RECT rect_from_cgrect(CGRect cgrect) enum macdrv_window_messages { WM_MACDRV_SET_WIN_REGION = WM_WINE_FIRST_DRIVER_MSG, - WM_MACDRV_DISPLAYCHANGE, WM_MACDRV_ACTIVATE_ON_FOLLOWING_FOCUS, };
@@ -268,7 +267,6 @@ extern CGImageRef create_cgimage_from_icon_bitmaps(HDC hdc, HANDLE icon, HBITMAP extern void macdrv_status_item_mouse_move(const macdrv_event *event);
extern void check_retina_status(void); -extern void macdrv_resize_desktop(void); extern void init_user_driver(void);
/* unixlib interface */ diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 35cf9255279..0bc3bf62add 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -1575,25 +1575,6 @@ void macdrv_SetDesktopWindow(HWND hwnd) set_app_icon(); }
-void macdrv_resize_desktop(void) -{ - HWND hwnd = NtUserGetDesktopWindow(); - CGRect new_desktop_rect; - RECT current_desktop_rect; - - macdrv_reset_device_metrics(); - new_desktop_rect = macdrv_get_desktop_rect(); - if (!NtUserGetWindowRect(hwnd, ¤t_desktop_rect) || - !CGRectEqualToRect(cgrect_from_rect(current_desktop_rect), new_desktop_rect)) - { - NtUserSetWindowPos(hwnd, 0, CGRectGetMinX(new_desktop_rect), CGRectGetMinY(new_desktop_rect), - CGRectGetWidth(new_desktop_rect), CGRectGetHeight(new_desktop_rect), - SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE); - send_message_timeout(HWND_BROADCAST, WM_MACDRV_DISPLAYCHANGE, 0, 0, - SMTO_ABORTIFHUNG, 2000, NULL); - } -} - #define WM_WINE_NOTIFY_ACTIVITY WM_USER
LRESULT macdrv_DesktopWindowProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) @@ -1614,9 +1595,6 @@ LRESULT macdrv_DesktopWindowProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) #pragma clang diagnostic pop break; } - case WM_DISPLAYCHANGE: - macdrv_resize_desktop(); - break; } return NtUserMessageCall(hwnd, msg, wp, lp, 0, NtUserDefWindowProc, FALSE); } @@ -2018,7 +1996,7 @@ LRESULT macdrv_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) release_win_data(data); } return 0; - case WM_MACDRV_DISPLAYCHANGE: + case WM_WINE_DESKTOP_RESIZED: macdrv_reset_device_metrics(); macdrv_reassert_window_position(hwnd); return 0; diff --git a/dlls/winewayland.drv/window.c b/dlls/winewayland.drv/window.c index dd023fc96a7..906dcbc42df 100644 --- a/dlls/winewayland.drv/window.c +++ b/dlls/winewayland.drv/window.c @@ -502,16 +502,6 @@ void WAYLAND_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags, wayland_win_data_release(data); }
-static void wayland_resize_desktop(void) -{ - RECT virtual_rect = NtUserGetVirtualScreenRect(); - NtUserSetWindowPos(NtUserGetDesktopWindow(), 0, - virtual_rect.left, virtual_rect.top, - virtual_rect.right - virtual_rect.left, - virtual_rect.bottom - virtual_rect.top, - SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE); -} - static void wayland_configure_window(HWND hwnd) { struct wayland_surface *surface; @@ -652,13 +642,6 @@ LRESULT WAYLAND_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) */ LRESULT WAYLAND_DesktopWindowProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) { - switch (msg) - { - case WM_DISPLAYCHANGE: - wayland_resize_desktop(); - break; - } - return NtUserMessageCall(hwnd, msg, wp, lp, 0, NtUserDefWindowProc, FALSE); }
diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c index cb119c9a7be..dae0d652737 100644 --- a/dlls/winex11.drv/desktop.c +++ b/dlls/winex11.drv/desktop.c @@ -100,25 +100,3 @@ BOOL is_desktop_fullscreen(void) return (primary_rect.right - primary_rect.left == host_primary_rect.right - host_primary_rect.left && primary_rect.bottom - primary_rect.top == host_primary_rect.bottom - host_primary_rect.top); } - -/*********************************************************************** - * X11DRV_resize_desktop - */ -void X11DRV_resize_desktop(void) -{ - static RECT old_virtual_rect; - - RECT virtual_rect = NtUserGetVirtualScreenRect(); - HWND hwnd = NtUserGetDesktopWindow(); - INT width = virtual_rect.right - virtual_rect.left, height = virtual_rect.bottom - virtual_rect.top; - - TRACE( "desktop %p change to (%dx%d)\n", hwnd, width, height ); - NtUserSetWindowPos( hwnd, 0, virtual_rect.left, virtual_rect.top, width, height, - SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE ); - - if (old_virtual_rect.left != virtual_rect.left || old_virtual_rect.top != virtual_rect.top) - send_message_timeout( HWND_BROADCAST, WM_X11DRV_DESKTOP_RESIZED, old_virtual_rect.left, - old_virtual_rect.top, SMTO_ABORTIFHUNG, 2000, FALSE ); - - old_virtual_rect = virtual_rect; -} diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index f975986a9d9..f2ffbebcc7c 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2063,9 +2063,6 @@ LRESULT X11DRV_DesktopWindowProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) case WM_WINE_ADD_TAB: send_notify_message( (HWND)wp, WM_X11DRV_ADD_TAB, 0, 0 ); break; - case WM_DISPLAYCHANGE: - X11DRV_resize_desktop(); - break; } return NtUserMessageCall( hwnd, msg, wp, lp, 0, NtUserDefWindowProc, FALSE ); } @@ -3111,7 +3108,7 @@ LRESULT X11DRV_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) release_win_data( data ); } return 0; - case WM_X11DRV_DESKTOP_RESIZED: + case WM_WINE_DESKTOP_RESIZED: if ((data = get_win_data( hwnd ))) { /* update the full screen state */ diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 2a326b07a4c..06d76499db7 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -580,7 +580,6 @@ enum x11drv_window_messages { WM_X11DRV_UPDATE_CLIPBOARD = WM_WINE_FIRST_DRIVER_MSG, WM_X11DRV_SET_WIN_REGION, - WM_X11DRV_DESKTOP_RESIZED, WM_X11DRV_DELETE_TAB, WM_X11DRV_ADD_TAB }; @@ -751,7 +750,6 @@ struct x11drv_settings_handler extern void X11DRV_Settings_SetHandler(const struct x11drv_settings_handler *handler);
extern void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height ); -extern void X11DRV_resize_desktop(void); extern BOOL is_virtual_desktop(void); extern BOOL is_desktop_fullscreen(void); extern BOOL is_detached_mode(const DEVMODEW *); diff --git a/include/ntuser.h b/include/ntuser.h index e22de3023d3..1d2f32b5ea6 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -504,6 +504,7 @@ enum wine_internal_message WM_WINE_KEYBOARD_LL_HOOK, WM_WINE_MOUSE_LL_HOOK, WM_WINE_UPDATEWINDOWSTATE, + WM_WINE_DESKTOP_RESIZED, WM_WINE_FIRST_DRIVER_MSG = 0x80001000, /* range of messages reserved for the USER driver */ WM_WINE_CLIPCURSOR = 0x80001ff0, /* internal driver notification messages */ WM_WINE_SETCURSOR,
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=146020
Your paranoid android.
=== debian11b (64 bit WoW report) ===
wmp: media: Timeout
On Mon Jun 3 11:48:28 2024 +0000, Rémi Bernon wrote:
changed this line in [version 2 of the diff](/wine/wine/-/merge_requests/5774/diffs?diff_id=116326&start_sha=cf5f65d12250385ba1cd038fdea429dc294503a5#ee9ef37e9f0b4e09db81b5a4d47b8c25fcbb1e1d_2988_2993)
I changed it to also send the messages whenever the virtual rect changes. It was not done consistently across drivers before.
On Mon Jun 3 11:16:43 2024 +0000, Rémi Bernon wrote:
~~Right, looks like there's some inconsistencies between `get_window_dpi_awareness_context` and `get_dpi_for_window`.~~ Actually no, it is per-monitor aware... but it resides on the primary monitor, so it uses the primary monitor DPI.
I restored the DPI context change.
On Mon Jun 3 10:27:07 2024 +0000, Rémi Bernon wrote:
Hmm, I think you're right. I was thinking that it would end up in a call to `apply_display_settings` but it's probably only going to refresh the display devices.
I changed this by sending the WM_DISPLAYCHANGE message when win32u gets notified from the drivers. This is generally only done from the desktop window thread, so calling `send_message( WM_DISPLAYCHANGE )` here should end up doing the same thing as calling the drivers `desktop_resired` functions.
Note that winemac is slightly different here, and also notifies win32u from a different thread, and was calling `macdrv_desktop_resired` from that thread before. I don't think this was right, and it now sends the message to the desktop window, which should be better.
This merge request was approved by Zhiyi Zhang.