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.
This commit is contained in:
parent
e1222ac33a
commit
52decb1ca6
3 changed files with 15 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue