destroy monitor on disabled

This commit is contained in:
vaxerski 2022-06-01 21:10:12 +02:00
parent 8d850b0ce1
commit 4f76d5d8d7

View File

@ -65,6 +65,10 @@ void Events::listener_newOutput(wl_listener* listener, void* data) {
if (monitorRule.disabled) {
wlr_output_enable(OUTPUT, 0);
wlr_output_commit(OUTPUT);
if (const auto PMONITOR = g_pCompositor->getMonitorFromName(std::string(OUTPUT->name)); PMONITOR) {
listener_monitorDestroy(nullptr, PMONITOR->output);
}
return;
}