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)
width = primary_rect.right;
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 );
update_desktop_fullscreen( width, height );
NtUserSetWindowPos( hwnd, 0, virtual_rect.left, virtual_rect.top,
......
......@@ -419,7 +419,7 @@ LONG X11DRV_ChangeDisplaySettings( LPDEVMODEW displays, HWND hwnd, DWORD flags,
if (ret == DISP_CHANGE_SUCCESSFUL)
ret = apply_display_settings( displays, ids, TRUE );
if (ret == DISP_CHANGE_SUCCESSFUL)
X11DRV_DisplayDevices_Update();
X11DRV_DisplayDevices_Init(TRUE);
done:
free( ids );
......@@ -558,13 +558,6 @@ void X11DRV_DisplayDevices_RegisterEventHandlers(void)
handler->register_event_handlers();
}
void X11DRV_DisplayDevices_Update(void)
{
X11DRV_DisplayDevices_Init(TRUE);
X11DRV_resize_desktop();
}
static BOOL force_display_devices_refresh;
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 )
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 );
}
......@@ -2993,9 +2996,6 @@ LRESULT X11DRV_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
release_win_data( data );
}
return 0;
case WM_X11DRV_RESIZE_DESKTOP:
X11DRV_resize_desktop();
return 0;
case WM_X11DRV_DESKTOP_RESIZED:
if ((data = get_win_data( hwnd )))
{
......
......@@ -572,7 +572,6 @@ enum x11drv_window_messages
{
WM_X11DRV_UPDATE_CLIPBOARD = 0x80001000,
WM_X11DRV_SET_WIN_REGION,
WM_X11DRV_RESIZE_DESKTOP,
WM_X11DRV_DESKTOP_RESIZED,
WM_X11DRV_SET_CURSOR,
WM_X11DRV_CLIP_CURSOR_NOTIFY,
......@@ -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_Init(BOOL force) 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 */
extern struct x11drv_display_device_handler desktop_handler DECLSPEC_HIDDEN;
......
......@@ -1198,8 +1198,9 @@ static BOOL xrandr14_device_change_handler( HWND hwnd, XEvent *event )
xrandr14_invalidate_current_mode_cache();
if (hwnd == NtUserGetDesktopWindow() && NtUserGetWindowThread( hwnd, NULL ) == GetCurrentThreadId())
{
X11DRV_DisplayDevices_Update();
X11DRV_DisplayDevices_Init( TRUE );
init_registry_display_settings();
X11DRV_resize_desktop();
}
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