Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental (please ignore) #3041

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/server/frontend_wayland/xdg_shell_stable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,10 @@ void mf::XdgToplevelStable::handle_active_change(bool /*is_now_active*/)

void mf::XdgToplevelStable::handle_resize(
std::optional<geometry::Point> const& /*new_top_left*/,
geometry::Size const& /*new_size*/)
geometry::Size const& new_size)
{
log_debug("mf::XdgToplevelStable::handle_resize({%d, %d})", new_size.width.as_int(), new_size.height.as_int());

send_toplevel_configure();
}

Expand Down Expand Up @@ -674,6 +676,8 @@ void mf::XdgToplevelStable::send_toplevel_configure()
// 0 sizes means default for toplevel configure
geom::Size size = requested_window_size().value_or(geom::Size{0, 0});

log_debug("mf::XdgToplevelStable::send_toplevel_configure({%d, %d})", size.width.as_int(), size.height.as_int());

send_configure_event(size.width.as_int(), size.height.as_int(), &states);
wl_array_release(&states);

Expand Down
4 changes: 4 additions & 0 deletions src/server/scene/basic_surface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include "mir/scene/scene_report.h"
#include "mir/scene/null_surface_observer.h"
#include "mir/log.h"

#include <boost/throw_exception.hpp>

Expand Down Expand Up @@ -285,6 +286,8 @@ std::vector<geom::Rectangle> ms::BasicSurface::get_input_region() const

void ms::BasicSurface::resize(geom::Size const& desired_size)
{
log_debug("ms::BasicSurface::resize({%d, %d})", desired_size.width.as_int(), desired_size.height.as_int());

geom::Size new_size = desired_size;
if (new_size.width <= geom::Width{0}) new_size.width = geom::Width{1};
if (new_size.height <= geom::Height{0}) new_size.height = geom::Height{1};
Expand All @@ -299,6 +302,7 @@ void ms::BasicSurface::resize(geom::Size const& desired_size)

observers->window_resized_to(this, new_size);
observers->content_resized_to(this, content_size_);
log_debug("ms::BasicSurface::resize(...) content_resized_to {%d, %d}", content_size_.width.as_int(), content_size_.height.as_int());
}
}

Expand Down
Loading