Skip to content

Commit

Permalink
Fix resize handling
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanGriffiths committed Sep 15, 2023
1 parent 156cc32 commit 6b2aa78
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/frontend_wayland/wayland_surface_observer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void mf::WaylandSurfaceObserver::content_resized_to(ms::Surface const*, geom::Si
run_on_wayland_thread_unless_window_destroyed(
[content_size](Impl* impl, WindowWlSurfaceRole* window)
{
if (content_size != impl->window_size)
if (impl->requested_size.value_or(impl->window_size) != content_size)
{
impl->requested_size = content_size;
window->handle_resize(std::nullopt, content_size);
Expand Down
35 changes: 35 additions & 0 deletions tests/acceptance-tests/wayland/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,41 @@ set(EXPECTED_FAILURES

# Not yet implemented, see https://github.com/MirServer/mir/issues/2861
XdgPopupTest.when_parent_surface_is_moved_a_reactive_popup_is_moved

# These tests depend on us not sending a configure event when the latest buffer was
# the "new" size. Even if we have sent a configure event with a different size
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/0
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/1
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/2
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/3
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/4
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/5
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/6
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/7
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/8
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/9
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/10
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/11
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/12
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/13
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/14
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/15
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/16
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/17
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/18
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/19
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/20
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/21
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/22
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/23
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/24
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/25
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/26
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/27
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/28
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/29
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/30
Anchor/LayerSurfaceLayoutTest.maximized_xdg_toplevel_is_shrunk_for_exclusive_zone/31
)

if (MIR_SIGBUS_HANDLER_ENVIRONMENT_BROKEN)
Expand Down

0 comments on commit 6b2aa78

Please sign in to comment.