Commit 63eeb236 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winex11.drv: Resize desktop window on WM_DISPLAYCHANGE message.

parent ba143493
...@@ -467,12 +467,6 @@ void X11DRV_resize_desktop(void) ...@@ -467,12 +467,6 @@ void X11DRV_resize_desktop(void)
width = primary_rect.right; width = primary_rect.right;
height = primary_rect.bottom; height = primary_rect.bottom;
if (NtUserGetWindowThread( hwnd, NULL ) != GetCurrentThreadId())
{
send_message( hwnd, WM_X11DRV_RESIZE_DESKTOP, 0, 0 );
return;
}
TRACE( "desktop %p change to (%dx%d)\n", hwnd, width, height ); TRACE( "desktop %p change to (%dx%d)\n", hwnd, width, height );
update_desktop_fullscreen( width, height ); update_desktop_fullscreen( width, height );
NtUserSetWindowPos( hwnd, 0, virtual_rect.left, virtual_rect.top, NtUserSetWindowPos( hwnd, 0, virtual_rect.left, virtual_rect.top,
......
...@@ -419,7 +419,7 @@ LONG X11DRV_ChangeDisplaySettings( LPDEVMODEW displays, HWND hwnd, DWORD flags, ...@@ -419,7 +419,7 @@ LONG X11DRV_ChangeDisplaySettings( LPDEVMODEW displays, HWND hwnd, DWORD flags,
if (ret == DISP_CHANGE_SUCCESSFUL) if (ret == DISP_CHANGE_SUCCESSFUL)
ret = apply_display_settings( displays, ids, TRUE ); ret = apply_display_settings( displays, ids, TRUE );
if (ret == DISP_CHANGE_SUCCESSFUL) if (ret == DISP_CHANGE_SUCCESSFUL)
X11DRV_DisplayDevices_Update(); X11DRV_DisplayDevices_Init(TRUE);
done: done:
free( ids ); free( ids );
...@@ -558,13 +558,6 @@ void X11DRV_DisplayDevices_RegisterEventHandlers(void) ...@@ -558,13 +558,6 @@ void X11DRV_DisplayDevices_RegisterEventHandlers(void)
handler->register_event_handlers(); handler->register_event_handlers();
} }
void X11DRV_DisplayDevices_Update(void)
{
X11DRV_DisplayDevices_Init(TRUE);
X11DRV_resize_desktop();
}
static BOOL force_display_devices_refresh; static BOOL force_display_devices_refresh;
BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manager, BOOL force, void *param ) BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manager, BOOL force, void *param )
......
...@@ -1893,6 +1893,9 @@ LRESULT X11DRV_DesktopWindowProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) ...@@ -1893,6 +1893,9 @@ LRESULT X11DRV_DesktopWindowProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
case WM_WINE_ADD_TAB: case WM_WINE_ADD_TAB:
send_notify_message( (HWND)wp, WM_X11DRV_ADD_TAB, 0, 0 ); send_notify_message( (HWND)wp, WM_X11DRV_ADD_TAB, 0, 0 );
break; break;
case WM_DISPLAYCHANGE:
X11DRV_resize_desktop();
break;
} }
return NtUserMessageCall( hwnd, msg, wp, lp, 0, NtUserDefWindowProc, FALSE ); return NtUserMessageCall( hwnd, msg, wp, lp, 0, NtUserDefWindowProc, FALSE );
} }
...@@ -2993,9 +2996,6 @@ LRESULT X11DRV_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) ...@@ -2993,9 +2996,6 @@ LRESULT X11DRV_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
release_win_data( data ); release_win_data( data );
} }
return 0; return 0;
case WM_X11DRV_RESIZE_DESKTOP:
X11DRV_resize_desktop();
return 0;
case WM_X11DRV_DESKTOP_RESIZED: case WM_X11DRV_DESKTOP_RESIZED:
if ((data = get_win_data( hwnd ))) if ((data = get_win_data( hwnd )))
{ {
......
...@@ -572,7 +572,6 @@ enum x11drv_window_messages ...@@ -572,7 +572,6 @@ enum x11drv_window_messages
{ {
WM_X11DRV_UPDATE_CLIPBOARD = 0x80001000, WM_X11DRV_UPDATE_CLIPBOARD = 0x80001000,
WM_X11DRV_SET_WIN_REGION, WM_X11DRV_SET_WIN_REGION,
WM_X11DRV_RESIZE_DESKTOP,
WM_X11DRV_DESKTOP_RESIZED, WM_X11DRV_DESKTOP_RESIZED,
WM_X11DRV_SET_CURSOR, WM_X11DRV_SET_CURSOR,
WM_X11DRV_CLIP_CURSOR_NOTIFY, WM_X11DRV_CLIP_CURSOR_NOTIFY,
...@@ -805,7 +804,6 @@ extern BOOL get_host_primary_gpu(struct gdi_gpu *gpu) DECLSPEC_HIDDEN; ...@@ -805,7 +804,6 @@ extern BOOL get_host_primary_gpu(struct gdi_gpu *gpu) DECLSPEC_HIDDEN;
extern void X11DRV_DisplayDevices_SetHandler(const struct x11drv_display_device_handler *handler) DECLSPEC_HIDDEN; extern void X11DRV_DisplayDevices_SetHandler(const struct x11drv_display_device_handler *handler) DECLSPEC_HIDDEN;
extern void X11DRV_DisplayDevices_Init(BOOL force) DECLSPEC_HIDDEN; extern void X11DRV_DisplayDevices_Init(BOOL force) DECLSPEC_HIDDEN;
extern void X11DRV_DisplayDevices_RegisterEventHandlers(void) DECLSPEC_HIDDEN; extern void X11DRV_DisplayDevices_RegisterEventHandlers(void) DECLSPEC_HIDDEN;
extern void X11DRV_DisplayDevices_Update(void) DECLSPEC_HIDDEN;
/* Display device handler used in virtual desktop mode */ /* Display device handler used in virtual desktop mode */
extern struct x11drv_display_device_handler desktop_handler DECLSPEC_HIDDEN; extern struct x11drv_display_device_handler desktop_handler DECLSPEC_HIDDEN;
......
...@@ -1198,8 +1198,9 @@ static BOOL xrandr14_device_change_handler( HWND hwnd, XEvent *event ) ...@@ -1198,8 +1198,9 @@ static BOOL xrandr14_device_change_handler( HWND hwnd, XEvent *event )
xrandr14_invalidate_current_mode_cache(); xrandr14_invalidate_current_mode_cache();
if (hwnd == NtUserGetDesktopWindow() && NtUserGetWindowThread( hwnd, NULL ) == GetCurrentThreadId()) if (hwnd == NtUserGetDesktopWindow() && NtUserGetWindowThread( hwnd, NULL ) == GetCurrentThreadId())
{ {
X11DRV_DisplayDevices_Update(); X11DRV_DisplayDevices_Init( TRUE );
init_registry_display_settings(); init_registry_display_settings();
X11DRV_resize_desktop();
} }
return FALSE; return FALSE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment