Commit 89c36c11 authored by Alexandros Frantzis's avatar Alexandros Frantzis Committed by Alexandre Julliard

winewayland.drv: Avoid resizing fullscreen windows.

If the window is already fullscreen and its size is compatible with what the compositor is requesting, don't force a resize, since some applications are very insistent on a particular fullscreen size (which may not match the monitor size).
parent 26c7dfb7
......@@ -324,7 +324,7 @@ void wayland_surface_attach_shm(struct wayland_surface *surface,
* Checks whether a wayland_surface_config object is compatible with the
* the provided arguments.
*/
static BOOL wayland_surface_config_is_compatible(struct wayland_surface_config *conf,
BOOL wayland_surface_config_is_compatible(struct wayland_surface_config *conf,
int width, int height,
enum wayland_surface_config_state state)
{
......
......@@ -201,6 +201,9 @@ void wayland_surface_attach_shm(struct wayland_surface *surface,
HRGN surface_damage_region) DECLSPEC_HIDDEN;
struct wayland_surface *wayland_surface_lock_hwnd(HWND hwnd) DECLSPEC_HIDDEN;
BOOL wayland_surface_reconfigure(struct wayland_surface *surface) DECLSPEC_HIDDEN;
BOOL wayland_surface_config_is_compatible(struct wayland_surface_config *conf,
int width, int height,
enum wayland_surface_config_state state) DECLSPEC_HIDDEN;
/**********************************************************************
* Wayland SHM buffer
......
......@@ -434,6 +434,21 @@ static void wayland_configure_window(HWND hwnd)
flags |= SWP_FRAMECHANGED;
}
/* If the window is already fullscreen and its size is compatible with what
* the compositor is requesting, don't force a resize, since some applications
* are very insistent on a particular fullscreen size (which may not match
* the monitor size). */
if ((surface->window.state & WAYLAND_SURFACE_CONFIG_STATE_FULLSCREEN) &&
wayland_surface_config_is_compatible(&surface->processing,
surface->window.rect.right -
surface->window.rect.left,
surface->window.rect.bottom -
surface->window.rect.top,
surface->window.state))
{
flags |= SWP_NOSIZE;
}
pthread_mutex_unlock(&surface->mutex);
TRACE("processing=%dx%d,%#x\n", width, height, state);
......
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