Skip to content

Commit

Permalink
Wrap the contents of Decoration::set_scale with `ThreadSafeAccess::…
Browse files Browse the repository at this point in the history
…spawn`
  • Loading branch information
tarek-y-ismail committed Oct 18, 2024
1 parent 11acc3c commit a23ecff
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/server/shell/decoration/basic_decoration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,12 @@ void msd::BasicDecoration::set_cursor(std::string const& cursor_image_name)

void msd::BasicDecoration::set_scale(float new_scale)
{
scale = new_scale;
redraw();
threadsafe_self->spawn(
[new_scale](auto* deco)
{
deco->scale = new_scale;
deco->redraw();
});
}

void msd::BasicDecoration::attrib_changed(mir::scene::Surface const*, MirWindowAttrib attrib, int)
Expand Down

0 comments on commit a23ecff

Please sign in to comment.