Skip to content

Commit 845f7e8

Browse files
committed
core: remove output state on global remove
fixes #35
1 parent b32b756 commit 845f7e8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Hyprsunset.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ int CHyprsunset::init() {
115115
}
116116
});
117117

118+
state.pRegistry->setGlobalRemove([this](CCWlRegistry* r, uint32_t name) { std::erase_if(state.outputs, [name](const auto& e) { return e->id == name; }); });
119+
118120
wl_display_roundtrip(state.wlDisplay);
119121

120122
if (!state.pCTMMgr) {

0 commit comments

Comments
 (0)