Etaash Mathamsetty (@etaash.mathamsetty) commented about dlls/winewayland.drv/wayland_surface.c:
- if ((state & mask) != (conf->state & mask)) return FALSE; + if ((surface->window.state ^ conf->state) & WAYLAND_SURFACE_CONFIG_STATE_MAXIMIZED) return FALSE;
/* The maximized state requires the configured size. During surface * reconfiguration we can use surface geometry to provide smaller areas * from larger sizes, so only smaller sizes are incompatible. */ - if ((conf->state & WAYLAND_SURFACE_CONFIG_STATE_MAXIMIZED) && - (rect.right - rect.left < conf->rect.right - conf->rect.left || - rect.bottom - rect.top < conf->rect.bottom - conf->rect.top)) - { - return FALSE; - } + if ((conf->state & WAYLAND_SURFACE_CONFIG_STATE_MAXIMIZED) && is_rect_smaller(rect, conf->rect)) return FALSE; + + /* If the compositor requested popup position doesn't match the win32 position, the window needs to be moved */ + if (wayland_surface_is_popup(surface) && (rect.left != conf->rect.left || rect.top != conf->rect.top)) return FALSE; I don't think this is right, if the compositor decides to move our popup, then we will not be able to reposition the popup (since returning false here would would prevent wayland_surface_reconfigure_geometry from getting called). This would also prevent it from getting mapped on the first frame if the compositor decided to move the popup.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11248#note_144290