Commit e10da7ab authored by Alexandros Frantzis's avatar Alexandros Frantzis Committed by Alexandre Julliard

winewayland.drv: Update desktop window size on display changes.

Update the desktop window size to match the current virtual screen rect.
parent 82c6becb
......@@ -110,6 +110,7 @@ void wayland_output_use_xdg_extension(struct wayland_output *output) DECLSPEC_HI
* USER driver functions
*/
LRESULT WAYLAND_DesktopWindowProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) DECLSPEC_HIDDEN;
BOOL WAYLAND_UpdateDisplayDevices(const struct gdi_device_manager *device_manager,
BOOL force, void *param) DECLSPEC_HIDDEN;
LRESULT WAYLAND_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) DECLSPEC_HIDDEN;
......
......@@ -31,6 +31,7 @@
static const struct user_driver_funcs waylanddrv_funcs =
{
.pDesktopWindowProc = WAYLAND_DesktopWindowProc,
.pUpdateDisplayDevices = WAYLAND_UpdateDisplayDevices,
.pWindowMessage = WAYLAND_WindowMessage
};
......
......@@ -30,6 +30,16 @@
WINE_DEFAULT_DEBUG_CHANNEL(waylanddrv);
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);
}
/**********************************************************************
* WAYLAND_WindowMessage
*/
......@@ -39,9 +49,25 @@ LRESULT WAYLAND_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
{
case WM_WAYLAND_INIT_DISPLAY_DEVICES:
wayland_init_display_devices(TRUE);
wayland_resize_desktop();
return 0;
default:
FIXME("got window msg %x hwnd %p wp %lx lp %lx\n", msg, hwnd, (long)wp, lp);
return 0;
}
}
/**********************************************************************
* WAYLAND_DesktopWindowProc
*/
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);
}
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