Skip to content

Commit

Permalink
Don't overwrite any requested size with the committed size
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanGriffiths committed Nov 25, 2024
1 parent 9247cc9 commit bcd98f3
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/server/frontend_wayland/layer_shell_v1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,8 @@ void mf::LayerSurfaceV1::configure()
{
// TODO: Error if told to configure on an axis the window is not streatched along

OptionalSize configure_size{std::nullopt, std::nullopt};
auto requested = unpadded_requested_size();
auto configure_size = client_size.committed();
auto const requested = unpadded_requested_size();

if (anchors.committed().left && anchors.committed().right)
{
Expand All @@ -464,16 +464,6 @@ void mf::LayerSurfaceV1::configure()
configure_size.height = requested.height;
}

if (client_size.committed().width)
{
configure_size.width = client_size.committed().width;
}

if (client_size.committed().height)
{
configure_size.height = client_size.committed().height;
}

auto const serial = Resource::client->next_serial(nullptr);
if (!inflight_configures.empty() && serial <= inflight_configures.back().first)
BOOST_THROW_EXCEPTION(std::runtime_error("Generated invalid configure serial"));
Expand Down

0 comments on commit bcd98f3

Please sign in to comment.