Skip to content

Commit

Permalink
output: release old workspace set after updating the current wset
Browse files Browse the repository at this point in the history
Fixes #1895.
  • Loading branch information
ammen99 committed Sep 12, 2023
1 parent 50a45a2 commit 7b76a07
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/output/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,12 @@ void wf::output_impl_t::set_workspace_set(std::shared_ptr<workspace_set_t> wset)

wset->attach_to_output(this);
wset->set_visible(true);
this->current_wset = wset;

{
// Delay freeing old_wset until we can safely report the new value
auto old_wset = std::move(this->current_wset);
this->current_wset = wset;
}

workspace_set_changed_signal data;
data.new_wset = wset;
Expand Down

0 comments on commit 7b76a07

Please sign in to comment.