Commit 52decb1c authored by Alexandros Frantzis's avatar Alexandros Frantzis Committed by Alexandre Julliard

winewayland.drv: Handle xdg_toplevel tiled states.

Tiled states don't place strict constraints on the surface size, but they indicate a strong size preference, so try to respect it.
parent e1222ac3
......@@ -91,6 +91,12 @@ static void xdg_toplevel_handle_configure(void *data,
case XDG_TOPLEVEL_STATE_RESIZING:
config_state |= WAYLAND_SURFACE_CONFIG_STATE_RESIZING;
break;
case XDG_TOPLEVEL_STATE_TILED_LEFT:
case XDG_TOPLEVEL_STATE_TILED_RIGHT:
case XDG_TOPLEVEL_STATE_TILED_TOP:
case XDG_TOPLEVEL_STATE_TILED_BOTTOM:
config_state |= WAYLAND_SURFACE_CONFIG_STATE_TILED;
break;
default:
break;
}
......
......@@ -60,7 +60,8 @@ enum wayland_window_message
enum wayland_surface_config_state
{
WAYLAND_SURFACE_CONFIG_STATE_MAXIMIZED = (1 << 0),
WAYLAND_SURFACE_CONFIG_STATE_RESIZING = (1 << 1)
WAYLAND_SURFACE_CONFIG_STATE_RESIZING = (1 << 1),
WAYLAND_SURFACE_CONFIG_STATE_TILED = (1 << 2)
};
struct wayland_cursor
......
......@@ -401,8 +401,13 @@ static void wayland_configure_window(HWND hwnd)
}
/* The Wayland maximized state is very strict about surface size, so don't
* let the application override it. */
if (state & WAYLAND_SURFACE_CONFIG_STATE_MAXIMIZED) flags |= SWP_NOSENDCHANGING;
* let the application override it. The tiled state is not as strict,
* but it indicates a strong size preference, so try to respect it. */
if (state & (WAYLAND_SURFACE_CONFIG_STATE_MAXIMIZED |
WAYLAND_SURFACE_CONFIG_STATE_TILED))
{
flags |= SWP_NOSENDCHANGING;
}
NtUserSetWindowPos(hwnd, 0, 0, 0, width, height, flags);
}
......
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