bugfix: we don't need to dereference the surface when getting the rectangle for our outlines (#279)

This commit is contained in:
Matthew Kosarek 2024-11-01 05:51:32 -04:00 committed by GitHub
parent 9b186b0352
commit 4bf11ee065
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -60,7 +60,7 @@ auto make_output_current(std::unique_ptr<mg::gl::OutputSurface> output) -> std::
class OutlineRenderable : public mir::graphics::Renderable
{
public:
OutlineRenderable(mir::graphics::Renderable const& renderable, int outline_width_px, float alpha) :
OutlineRenderable(Renderable const& renderable, int outline_width_px, float alpha) :
renderable { renderable },
outline_width_px { outline_width_px },
_alpha { alpha }
@ -83,8 +83,7 @@ public:
if (!surface)
return {};
return get_rectangle({ surface.value()->top_left(),
surface.value()->window_size() });
return get_rectangle(renderable.screen_position());
}
[[nodiscard]] geom::RectangleD src_bounds() const override